Skip to content

Commit

Permalink
Infrastructure: Disable TerserPlugin for web-packed globals injection
Browse files Browse the repository at this point in the history
Using the TerserPlugin to minimize web-packed to globals injection heavily decreased performance.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
  • Loading branch information
florian-h05 committed Jul 29, 2023
1 parent 10d9581 commit 692e6af
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions build/@globals-webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const path = require('path');
const TerserPlugin = require('terser-webpack-plugin');

module.exports = {
entry: './build/@openhab-globals.js',
Expand All @@ -9,17 +8,7 @@ module.exports = {
maxEntrypointSize: 512000,
maxAssetSize: 512000
},
optimization: {
minimize: true,
minimizer: [
new TerserPlugin({
terserOptions: {
keep_classnames: true,
keep_fnames: true
}
})
]
},
// Do NOT set up "minimize" using "TerserPlugin", as this heavily decreased performance for the cached version
externals: [
{
'@runtime': {
Expand Down

0 comments on commit 692e6af

Please sign in to comment.