Skip to content

Commit

Permalink
refactor: Update webpack configuration for improved output file namin…
Browse files Browse the repository at this point in the history
…g and chunk optimization; add vendor and main JavaScript files
  • Loading branch information
wvanheemstra committed Jan 11, 2025
1 parent ec8ad45 commit 7dd0dbb
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 3 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*! decimal.js-light v2.5.1 https://github.com/MikeMcl/decimal.js-light/LICENCE */

/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
12 changes: 9 additions & 3 deletions threagile-monitoring/src/threagile_monitoring/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const config = {
devtool: 'inline-nosources-cheap-source-map',
output: {
path: path.resolve(__dirname, 'static/js'),
filename: 'app.js'
filename: '[name].[contenthash].js'
},
module: {
rules: [
Expand All @@ -25,8 +25,14 @@ const config = {
optimization: {
splitChunks: {
chunks: 'all',
minSize: 20000,
maxSize: 244000,
maxInitialRequests: 10,
cacheGroups: {
vendor: {
test: /[\\/]node_modules[\\/]/,
name: 'vendors',
chunks: 'all'
}
}
}
}
}
Expand Down

0 comments on commit 7dd0dbb

Please sign in to comment.