Skip to content

Commit

Permalink
Infrastructure: Disable Webpack TerserPlugin for cached globals injec…
Browse files Browse the repository at this point in the history
…tion (#283)

Regression from #273.

Using the Webpack TerserPlugin to minimize web-packed, cached globals injection heavily decreased performance, therefore remove it.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
  • Loading branch information
florian-h05 authored Jul 30, 2023
1 parent facc39b commit 9188abc
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 (very) negatively affects performance for the cached version
externals: [
{
'@runtime': {
Expand Down

0 comments on commit 9188abc

Please sign in to comment.