From 9792b7c8f6200f38ba4bb2ec8080fbb1bc0483b4 Mon Sep 17 00:00:00 2001 From: Rom1-B Date: Mon, 12 Jan 2026 10:16:12 +0100 Subject: [PATCH] Fix(CI): error during build release archive --- .webpack.config.js | 34 +++++++++++++++++++++++++++++----- public/css/gantt.scss | 2 -- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/.webpack.config.js b/.webpack.config.js index 0a14f2a..09c9fe1 100644 --- a/.webpack.config.js +++ b/.webpack.config.js @@ -39,8 +39,9 @@ module.exports = [ 'libs': path.resolve(__dirname, 'public/js/libs.js'), }, output: { - filename: 'libs.js', + filename: '[name].[contenthash].js', path: path.resolve(__dirname, 'public/lib'), + clean: true, }, module: { rules: [ @@ -64,11 +65,34 @@ module.exports = [ }, ], }, - plugins: [ - new webpack.optimize.LimitChunkCountPlugin({ - maxChunks: 1, - }), + // Exclude dhtmlx-gantt from the bundle: it will be provided at runtime as global `gantt`. + externals: [ + function ({ request }, callback) { + if (/^dhtmlx-gantt(\/|$)/.test(request)) { + return callback(null, 'gantt'); + } + callback(); + } ], + // Enable automatic splitting of vendor code + optimization: { + splitChunks: { + chunks: 'all', + cacheGroups: { + vendors: { + test: /[\\/]node_modules[\\/]/, + name: 'vendors', + enforce: true, + priority: -10 + }, + default: false + } + }, + runtimeChunk: { + name: 'runtime' + }, + minimize: true + }, resolve: { // Use only main file in requirement resolution as we do not yet handle modules correctly mainFields: [ diff --git a/public/css/gantt.scss b/public/css/gantt.scss index 16c605c..c72e2f2 100644 --- a/public/css/gantt.scss +++ b/public/css/gantt.scss @@ -176,9 +176,7 @@ } .gantt_today, .gantt_marker.today { - background: inherit; color: var(--dhx-gantt-base-colors-white); - position: absolute; font-size: var(--dhx-gantt-caption-font-size); line-height: var(--dhx-gantt-caption-line-height); font-weight: var(--dhx-gantt-caption-line-weight);