Skip to content

Commit 1189dc0

Browse files
authored
Fix for node & npm issues (#2276)
* Roll back node version to 16.x for some compatible issue in centos7 env * Avoid the generation of app_bundle.js.LICENTSE.txt
1 parent 9997c2e commit 1189dc0

File tree

5 files changed

+65
-44
lines changed

5 files changed

+65
-44
lines changed

addons/content-browse/ui/package-lock.json

Lines changed: 35 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

addons/content-browse/ui/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"babel-loader": "^9.1.2",
1818
"webpack": "^5.75.0",
1919
"webpack-cli": "^5.0.1",
20-
"webpack-dev-server": "^4.11.1"
20+
"webpack-dev-server": "^4.11.1",
21+
"terser-webpack-plugin": "^5.3.7"
2122
},
2223
"scripts": {
2324
"webpack": "node node_modules/webpack/bin/webpack.js",

addons/content-browse/ui/webpack.dev.config.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,19 @@ module.exports = {
2828
contentBase: './build/content-browse',
2929
port: 3000
3030
},
31+
optimization: {
32+
minimize: true,
33+
minimizer: [
34+
new TerserPlugin({
35+
extractComments: false,
36+
terserOptions: {
37+
format: {
38+
comments: false,
39+
},
40+
},
41+
}),
42+
],
43+
},
3144
module: {
3245
rules: [
3346
{ test: /\.js$/, use: 'babel-loader', exclude: /node_modules/ },

addons/content-browse/ui/webpack.prod.config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616
const path = require('path')
1717
const webpack = require('webpack')
18+
const TerserPlugin = require('terser-webpack-plugin')
1819

1920
module.exports = {
2021
entry: './src/main/js/app.js',
@@ -30,6 +31,19 @@ module.exports = {
3031
}
3132
})
3233
],
34+
optimization: {
35+
minimize: true,
36+
minimizer: [
37+
new TerserPlugin({
38+
extractComments: false,
39+
terserOptions: {
40+
format: {
41+
comments: false,
42+
},
43+
},
44+
}),
45+
],
46+
},
3347
module: {
3448
rules: [
3549
{ test: /\.js$/, use: 'babel-loader', exclude: /node_modules/ },

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2099,7 +2099,7 @@
20992099
</goals>
21002100
<phase>generate-resources</phase>
21012101
<configuration>
2102-
<nodeVersion>v18.12.1</nodeVersion>
2102+
<nodeVersion>v16.19.1</nodeVersion>
21032103
<npmVersion>9.4.0</npmVersion>
21042104
</configuration>
21052105
</execution>

0 commit comments

Comments
 (0)