Skip to content

Commit 1b0eccd

Browse files
committed
migrate to webpack5
1 parent 6a81b8f commit 1b0eccd

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"sideEffects": false,
1313
"scripts": {
1414
"build": "npm publish --dry-run",
15-
"prepare": "npm run clean && webpack && tsc --build tsconfig.dist.json tsconfig.dist.es5+esm.json && ts-node tools/esmify.ts dist.es5+esm/*.js dist.es5+esm/*/*.js",
15+
"prepare": "npm run clean && webpack --bail && tsc --build tsconfig.dist.json tsconfig.dist.es5+esm.json && ts-node tools/esmify.ts dist.es5+esm/*.js dist.es5+esm/*/*.js",
1616
"prepublishOnly": "run-p 'test:dist:*' && npm run test:browser",
1717
"clean": "rimraf build dist dist.*",
1818
"test": "mocha 'test/**/*.test.ts'",
@@ -84,7 +84,7 @@
8484
"tsconfig-paths": "latest",
8585
"typescript": "latest",
8686
"web-streams-polyfill": "latest",
87-
"webpack": "^4",
87+
"webpack": "latest",
8888
"webpack-cli": "latest"
8989
},
9090
"dependencies": {},

webpack.config.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import path from "path";
2-
// @ts-expect-error
32
import webpack from "webpack";
43
import _ from "lodash";
54
// @ts-expect-error
@@ -9,6 +8,7 @@ const config = {
98
mode: "production",
109

1110
entry: "./src/index.ts",
11+
target: ["web", "es5"],
1212
output: {
1313
path: path.resolve(__dirname, "dist.es5+umd"),
1414
library: "MessagePack",
@@ -42,7 +42,6 @@ const config = {
4242
],
4343

4444
optimization: {
45-
noEmitOnErrors: true,
4645
minimize: undefined as boolean | undefined,
4746
},
4847

0 commit comments

Comments
 (0)