Skip to content
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/dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"private": true,
"name": "webpack-alias-dev-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 to a new major version (v1 to v2) introduces breaking changes. The associated webpack configuration file for this fixture, fixtures/packaging/webpack-alias/dev/config.js, is now incompatible and will cause the build script to fail.

The resolve.root option used in the configuration was removed in webpack v2. It must be migrated to resolve.modules.

Example of required change in config.js:

The resolve configuration needs to be updated.
Before (webpack 1.x):

resolve: {
  root: path.resolve('../../../../build/node_modules'),
  alias: { /* ... */ }
}

After (webpack 2.x):

resolve: {
  modules: [
    path.resolve('../../../../build/node_modules'),
    'node_modules' // Also recommended to add
  ],
  alias: { /* ... */ }
}

This PR is incomplete as-is and will break the build for this fixture until the configuration is also updated.

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