Upgrade webpack to version 5

The only noticeable changes are that the built files are now *slightly* smaller, and that Webpack now supports optional chaining and nullish coalescing without the need for Babel plugins.
This commit is contained in:
Jonas Jenwald 2020-10-11 10:08:22 +02:00
parent e59a90d8e9
commit 666dd73ce8
3 changed files with 912 additions and 273 deletions

View File

@ -217,18 +217,6 @@ function createWebpackConfig(defines, output) {
options: {
presets: skipBabel ? undefined : ["@babel/preset-env"],
plugins: [
[
"@babel/plugin-proposal-nullish-coalescing-operator",
{
loose: true,
},
],
[
"@babel/plugin-proposal-optional-chaining",
{
loose: true,
},
],
"@babel/plugin-transform-modules-commonjs",
[
"@babel/plugin-transform-runtime",

1083
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -3,8 +3,6 @@
"version": "2.0.0",
"devDependencies": {
"@babel/core": "^7.11.6",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.10.4",
"@babel/plugin-proposal-optional-chaining": "^7.11.0",
"@babel/plugin-transform-modules-commonjs": "^7.10.4",
"@babel/plugin-transform-runtime": "^7.11.5",
"@babel/preset-env": "^7.11.5",
@ -58,7 +56,7 @@
"vinyl": "^2.2.1",
"vinyl-fs": "^3.0.3",
"web-streams-polyfill": "^3.0.0",
"webpack": "^4.44.2",
"webpack": "^5.0.0",
"webpack-stream": "~6.1.0",
"wintersmith": "^2.5.0",
"yargs": "^11.1.1"