Skip to content

[Snyk] Security upgrade webpack from 1.15.0 to 2.2.0 #562

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fixtures/packaging/webpack-alias/prod/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"private": true,
"name": "webpack-alias-prod-fixture",
"dependencies": {
"webpack": "^1.14.0"
"webpack": "^2.2.0"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

Upgrading webpack from v1 to v2 is a major version bump that introduces significant breaking changes. The current Webpack configuration for this fixture is not compatible with v2 and will cause the build script to fail.

The associated configuration file, fixtures/packaging/webpack-alias/prod/config.js, uses resolve.root, which was removed in Webpack 2. This option needs to be migrated to resolve.modules for the build to work.

Here's an example of how config.js should be updated:

  resolve: {
    modules: [path.resolve('../../../../build/node_modules'), 'node_modules'],
    alias: {
      // ...
    },
  },

While this upgrade is necessary for security, the configuration must be updated simultaneously to prevent breaking the build process for this fixture. You can find more information in the official Webpack migration guide.

},
"scripts": {
"build": "rm -f output.js && webpack --config config.js"
Expand Down
Loading