Skip to content

Commit e41ef41

Browse files
authored
chore!: drop webpack-4 support in v5 (#6598)
1. I don't think I'll ever have the capacity to keep maintaining this compat plugin. It's better to drop it now than later. 2. The plugin is needed at the time of alpha.0 because many ecosystem plugins does not support webpack 5. But now I don't think it will be a major hurdle. 3. The implementation was too hacky.
1 parent 45e804b commit e41ef41

File tree

12 files changed

+2
-398
lines changed

12 files changed

+2
-398
lines changed

.circleci/config.yml

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -49,27 +49,13 @@ jobs:
4949
at: ~/
5050
- run: yarn test -p cli,cli-service,cli-shared-utils
5151

52-
core-webpack-4:
53-
<<: *defaults
54-
steps:
55-
- attach_workspace:
56-
at: ~/
57-
- run: VUE_CLI_USE_WEBPACK4=true yarn test -p cli,cli-service,cli-shared-utils
58-
5952
typescript:
6053
<<: *defaults
6154
steps:
6255
- attach_workspace:
6356
at: ~/
6457
- run: yarn test 'ts(?:\w(?!E2e))+\.spec\.js$'
6558

66-
typescript-webpack-4:
67-
<<: *defaults
68-
steps:
69-
- attach_workspace:
70-
at: ~/
71-
- run: VUE_CLI_USE_WEBPACK4=true yarn test 'ts(?:\w(?!E2e))+\.spec\.js$'
72-
7359
plugins:
7460
<<: *defaults
7561
steps:
@@ -79,13 +65,6 @@ jobs:
7965
- run: yarn check-links
8066
- run: yarn test -p eslint,pwa,babel,babel-preset-app,vuex,router
8167

82-
plugins-webpack-4:
83-
<<: *defaults
84-
steps:
85-
- attach_workspace:
86-
at: ~/
87-
- run: VUE_CLI_USE_WEBPACK4=true yarn test -p eslint,pwa,babel,babel-preset-app,vuex,router
88-
8968
tests:
9069
<<: *defaults
9170
steps:
@@ -95,14 +74,6 @@ jobs:
9574
# e2e-nightwatch was left out due to some unknown issues with selenium and the CI image
9675
- run: yarn test tsPluginE2e
9776

98-
tests-webpack-4:
99-
<<: *defaults
100-
steps:
101-
- attach_workspace:
102-
at: ~/
103-
- run: VUE_CLI_USE_WEBPACK4=true yarn test -p unit-mocha,unit-jest,e2e-cypress
104-
- run: VUE_CLI_USE_WEBPACK4=true yarn test tsPluginE2e
105-
10677
cli-ui:
10778
<<: *defaults
10879
steps:
@@ -116,8 +87,6 @@ jobs:
11687
- store_artifacts:
11788
path: /home/circleci/.npm/_logs
11889

119-
# TODO: cli-ui-webpack-4
120-
12190
workflows:
12291
version: 2
12392
test:
@@ -128,34 +97,18 @@ workflows:
12897
<<: *filters
12998
requires:
13099
- install
131-
- core-webpack-4:
132-
<<: *filters
133-
requires:
134-
- install
135100
- typescript:
136101
<<: *filters
137102
requires:
138103
- install
139-
- typescript-webpack-4:
140-
<<: *filters
141-
requires:
142-
- install
143104
- plugins:
144105
<<: *filters
145106
requires:
146107
- install
147-
- plugins-webpack-4:
148-
<<: *filters
149-
requires:
150-
- install
151108
- tests:
152109
<<: *filters
153110
requires:
154111
- install
155-
- tests-webpack-4:
156-
<<: *filters
157-
requires:
158-
- install
159112
- cli-ui:
160113
<<: *filters
161114
requires:

docs/core-plugins/webpack-4.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/migrations/migrate-from-v4.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,6 @@ Besides the internal changes that are only noticeable for custom configurations,
6060
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);`
6161
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).
6262

63-
#### Opt Out to Webpack 4
64-
65-
Considering many ecosystem packages haven't catched up yet, we provided a plugin to opt out to webpack 4 for easier migration.
66-
67-
It's as simple as running
68-
69-
```sh
70-
vue add webpack-4
71-
```
72-
73-
at the project root.
74-
75-
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.
76-
77-
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.
78-
7963
#### Changes to the `build` command and modern mode
8064

8165
Starting with v5.0.0-beta.0, running `vue-cli-service build` will automatically generate different bundles based on your browserslist configurations.

jest.config.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,3 @@ module.exports = {
77
'**/__tests__/**/*.spec.js'
88
]
99
}
10-
11-
if (process.env.VUE_CLI_USE_WEBPACK4) {
12-
module.exports.moduleNameMapper = {
13-
'^webpack$': 'webpack-4',
14-
'^webpack/(.*)': 'webpack-4/$1'
15-
}
16-
}

packages/@vue/cli-plugin-webpack-4/README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/@vue/cli-plugin-webpack-4/generator.js

Lines changed: 0 additions & 51 deletions
This file was deleted.

packages/@vue/cli-plugin-webpack-4/index.js

Lines changed: 0 additions & 158 deletions
This file was deleted.

packages/@vue/cli-plugin-webpack-4/package.json

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)