Skip to content
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

chore!: drop webpack-4 support in v5 #6598

Merged
merged 1 commit into from
Jul 30, 2021
Merged
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
47 changes: 0 additions & 47 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,27 +49,13 @@ jobs:
at: ~/
- run: yarn test -p cli,cli-service,cli-shared-utils

core-webpack-4:
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run: VUE_CLI_USE_WEBPACK4=true yarn test -p cli,cli-service,cli-shared-utils

typescript:
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run: yarn test 'ts(?:\w(?!E2e))+\.spec\.js$'

typescript-webpack-4:
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run: VUE_CLI_USE_WEBPACK4=true yarn test 'ts(?:\w(?!E2e))+\.spec\.js$'

plugins:
<<: *defaults
steps:
Expand All @@ -79,13 +65,6 @@ jobs:
- run: yarn check-links
- run: yarn test -p eslint,pwa,babel,babel-preset-app,vuex,router

plugins-webpack-4:
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run: VUE_CLI_USE_WEBPACK4=true yarn test -p eslint,pwa,babel,babel-preset-app,vuex,router

tests:
<<: *defaults
steps:
Expand All @@ -95,14 +74,6 @@ jobs:
# e2e-nightwatch was left out due to some unknown issues with selenium and the CI image
- run: yarn test tsPluginE2e

tests-webpack-4:
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run: VUE_CLI_USE_WEBPACK4=true yarn test -p unit-mocha,unit-jest,e2e-cypress
- run: VUE_CLI_USE_WEBPACK4=true yarn test tsPluginE2e

cli-ui:
<<: *defaults
steps:
Expand All @@ -116,8 +87,6 @@ jobs:
- store_artifacts:
path: /home/circleci/.npm/_logs

# TODO: cli-ui-webpack-4

workflows:
version: 2
test:
Expand All @@ -128,34 +97,18 @@ workflows:
<<: *filters
requires:
- install
- core-webpack-4:
<<: *filters
requires:
- install
- typescript:
<<: *filters
requires:
- install
- typescript-webpack-4:
<<: *filters
requires:
- install
- plugins:
<<: *filters
requires:
- install
- plugins-webpack-4:
<<: *filters
requires:
- install
- tests:
<<: *filters
requires:
- install
- tests-webpack-4:
<<: *filters
requires:
- install
- cli-ui:
<<: *filters
requires:
Expand Down
3 changes: 0 additions & 3 deletions docs/core-plugins/webpack-4.md

This file was deleted.

16 changes: 0 additions & 16 deletions docs/migrations/migrate-from-v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,6 @@ Besides the internal changes that are only noticeable for custom configurations,
1. Named exports from JSON modules are no longer supported. Instead of `import { version } from './package.json'; console.log(version);` use `import package from './package.json'; console.log(package.version);`
2. Webpack 5 does no longer include polyfills for Node.js modules by default. You shall see an informative error message if your code relies on any of these modules. A detailed list of previously polyfilled modules is also available [here](https://github.com/webpack/webpack/pull/8460/commits/a68426e9255edcce7822480b78416837617ab065).

#### Opt Out to Webpack 4

Considering many ecosystem packages haven't catched up yet, we provided a plugin to opt out to webpack 4 for easier migration.

It's as simple as running

```sh
vue add webpack-4
```

at the project root.

Underlyingly, it uses the [`resolutions`](https://classic.yarnpkg.com/en/docs/selective-version-resolutions) field for Yarn and PNPM users, and [`module-alias`](https://github.com/ilearnio/module-alias) for NPM users.

Though both work in all our tests, please be aware that the `module-alias` approach is still considered hacky, and may not be as stable as the `"resolutions"` one.

#### Changes to the `build` command and modern mode

Starting with v5.0.0-beta.0, running `vue-cli-service build` will automatically generate different bundles based on your browserslist configurations.
Expand Down
7 changes: 0 additions & 7 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,3 @@ module.exports = {
'**/__tests__/**/*.spec.js'
]
}

if (process.env.VUE_CLI_USE_WEBPACK4) {
module.exports.moduleNameMapper = {
'^webpack$': 'webpack-4',
'^webpack/(.*)': 'webpack-4/$1'
}
}
3 changes: 0 additions & 3 deletions packages/@vue/cli-plugin-webpack-4/README.md

This file was deleted.

51 changes: 0 additions & 51 deletions packages/@vue/cli-plugin-webpack-4/generator.js

This file was deleted.

158 changes: 0 additions & 158 deletions packages/@vue/cli-plugin-webpack-4/index.js

This file was deleted.

41 changes: 0 additions & 41 deletions packages/@vue/cli-plugin-webpack-4/package.json

This file was deleted.

Loading