Skip to content

Commit ec4b63b

Browse files
committed
chore: Bump webpack to latest version
1 parent ef8c499 commit ec4b63b

File tree

3 files changed

+1835
-1457
lines changed

3 files changed

+1835
-1457
lines changed

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
],
1111
"types": "./src/index.d.ts",
1212
"scripts": {
13-
"build:umd": "webpack src --output browser/elastic-builder.min.js --mode production",
13+
"build:umd": "webpack ./src/index.js --output-path browser --output-filename elastic-builder.min.js --mode production",
1414
"build:docs": "documentation build src/index.js --github -o docs -f html -c ./docs/documentation.yml",
1515
"build": "npm run build:umd && npm run build:docs",
1616
"lint": "eslint src test",
@@ -32,12 +32,12 @@
3232
},
3333
"devDependencies": {
3434
"ava": "^0.25.0",
35-
"babel-cli": "^6.26.0",
36-
"babel-core": "^6.26.3",
35+
"@babel/cli": "^7.25.9",
36+
"@babel/core": "^7.25.9",
3737
"babel-eslint": "^8.2.6",
38-
"babel-loader": "^7.1.5",
39-
"babel-plugin-transform-runtime": "^6.23.0",
40-
"babel-preset-env": "^1.7.0",
38+
"babel-loader": "^10.0.0",
39+
"@babel/plugin-transform-runtime": "^7.25.9",
40+
"@babel/preset-env": "^7.25.9",
4141
"cross-env": "^5.2.0",
4242
"documentation": "^8.0.0",
4343
"eslint": "^5.1.0",
@@ -51,9 +51,9 @@
5151
"prettier": "^1.13.7",
5252
"sinon": "^6.1.3",
5353
"typescript": "^2.9.2",
54-
"uglifyjs-webpack-plugin": "^1.2.7",
55-
"webpack": "^4.16.0",
56-
"webpack-cli": "^3.0.8"
54+
"terser-webpack-plugin": "^5.3.14",
55+
"webpack": "^5.101.2",
56+
"webpack-cli": "^6.0.1"
5757
},
5858
"release": {
5959
"branches": [

webpack.config.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
11
'use strict';
22

3-
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
3+
const TerserPlugin = require('terser-webpack-plugin');
44

55
module.exports = {
66
output: {
7-
library: 'esb',
8-
libraryTarget: 'umd'
7+
library: {
8+
name: 'esb',
9+
type: 'umd'
10+
}
911
},
1012
optimization: {
1113
minimizer: [
12-
new UglifyJSPlugin({
13-
sourceMap: false,
14-
uglifyOptions: {
15-
beautify: false,
14+
new TerserPlugin({
15+
terserOptions: {
16+
format: {
17+
beautify: false,
18+
comments: false
19+
},
1620
mangle: {
1721
toplevel: true,
1822
keep_fnames: false
1923
},
20-
compressor: {
24+
compress: {
2125
warnings: false,
2226
conditionals: true,
2327
unused: true,
@@ -28,8 +32,7 @@ module.exports = {
2832
if_return: true,
2933
join_vars: true,
3034
negate_iife: false
31-
},
32-
comments: false
35+
}
3336
}
3437
})
3538
]

0 commit comments

Comments
 (0)