Skip to content

Conversation

@davidkellerman
Copy link
Contributor

See commit comments for more details.

Webpack 5 seems to do minimization by default using terser. So, removed
all the `uglifyjs-webpack-plugin` coding. Minimization is by default
controlled by the `mode` setting (e.g. on for `production`, off for
`development`). Changed handling of clientjs `minify` option to
enable/disable minimization if it is set explicitly, but otherwise
follow the default Webpack behavior.

Dropped `only-if-changed-webpack-plugin`; it appears to be abandoned.
The npm entry doesn't link to a source repository (although
`https://github.com/jsdf/only-if-changed-webpack-plugin` seems to be the
source). We were loading from a fork at
`https://github.com/vhadianto/only-if-changed-webpack-plugin`.

Webpack 5 tightens up the options syntax in several places. It doesn't
like abbreviated `mode` strings. It doesn't like `false` as a `devtool`
value, and it wants `eval-cheap-module-source-map` instead of
`cheap-module-eval-source-map`.

For `polymer-webpack-loader`, needed to load from PR #135 for
compatibility with webpack 5.

The current (9.1.2) `babel-loader` supports webpack 5.x, Babel ^7.12.0
and Node.js >=14.15.0. However, webpack 5 doesn't install correctly with
the npm v6 that is the default on Node.js 14 (there's apparently a bug
with peer dependencies in npm); it wants npm v7. (And npm v7 switches to
the v2 lockfile format.) Updated `package.json` `dependencies`
accordingly, and set `engines` to >=16.0.0.

Removed `imports-loader` and `script-loader` from `package.json`
`dependencies`. They're not used in the package.

Updated reference files in `src/test/data` so tests pass. Just copied
over the actual test outputs; didn't actually check they're correct.

Updated `documentation` to v13. For some reason, v14 generates corrupted
output missing line breaks. For what it's worth, the
`documentationjs/documentation` repo has 190 open issues and 16 open
PRs.
Trying to get npm install from github repo to work correctly...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants