Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 90d3dfc

Browse filesBrowse files
authored
chore!: some trivial dependency major version updates (#5951)
1 parent b8d593a commit 90d3dfc
Copy full SHA for 90d3dfc

File tree

Expand file treeCollapse file tree

7 files changed

+193
-122
lines changed
Filter options
Expand file treeCollapse file tree

7 files changed

+193
-122
lines changed

‎docs/migrations/migrate-from-v4.md

Copy file name to clipboardExpand all lines: docs/migrations/migrate-from-v4.md
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ If you want to migrate manually and gradually, you can run `vue upgrade <the-plu
4040

4141
### The `vue` Command (The Global `@vue/cli` Package)
4242

43+
### `@vue/cli-service`
44+
45+
Updated several underlying loaders and plugins:
46+
47+
* Updated `copy-webpack-plugin` from v5 to v6. If you never customized its config through `config.plugin('copy')`, there should be no user-facing breaking changes. A full list of breaking changes is available at <https://github.com/webpack-contrib/copy-webpack-plugin/releases/tag/v6.0.0>.
48+
* Updated `file-loader` from v4 to v6, and `url-loader` from v2 to v4. The `esModule` option is now turned on by default for non-Vue-2 projects. Full changelog available at <https://github.com/webpack-contrib/file-loader/blob/master/CHANGELOG.md> and <https://github.com/webpack-contrib/url-loader/blob/master/CHANGELOG.md>
49+
* Updated `terser-webpack-plugin` from v2 to v4, using terser 5 and some there are some changes in the options format. Full changelog at <https://github.com/webpack-contrib/terser-webpack-plugin/blob/master/CHANGELOG.md>
50+
4351
### ESLint Plugin
4452

4553
* `eslint-loader` is upgraded [from v2 to v4](https://github.com/webpack-contrib/eslint-loader/blob/master/CHANGELOG.md). The only major change is that it dropped support for ESLint < v6.
@@ -48,6 +56,7 @@ If you want to migrate manually and gradually, you can run `vue upgrade <the-plu
4856

4957
* Dropped TSLint support. As [TSLint has been deprecated](https://github.com/palantir/tslint/issues/4534), we [removed](https://github.com/vuejs/vue-cli/pull/5065) all TSLint-related code in this version.
5058
Please consider switching to ESLint. You can check out [`tslint-to-eslint-config`](https://github.com/typescript-eslint/tslint-to-eslint-config) for a mostly automatic migration experience.
59+
* Updated `ts-loader` from v6 to v8. It now only supports TypeScript >= 3.6.
5160
* Updated `fork-ts-checker-webpack-plugin` from v3.x to v5.x, you can see the detailed breaking changes at <https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/releases/tag/v4.0.0> and <https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/releases/tag/v5.0.0>
5261

5362
### E2E-Cypress Plugin

‎packages/@vue/cli-plugin-babel/package.json

Copy file name to clipboardExpand all lines: packages/@vue/cli-plugin-babel/package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"@vue/cli-shared-utils": "^4.5.7",
2626
"babel-loader": "^8.1.0",
2727
"cache-loader": "^4.1.0",
28-
"thread-loader": "^2.1.3",
28+
"thread-loader": "^3.0.0",
2929
"webpack": "^4.0.0"
3030
},
3131
"peerDependencies": {

‎packages/@vue/cli-plugin-typescript/package.json

Copy file name to clipboardExpand all lines: packages/@vue/cli-plugin-typescript/package.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
"cache-loader": "^4.1.0",
2929
"fork-ts-checker-webpack-plugin": "^5.0.11",
3030
"globby": "^9.2.0",
31-
"thread-loader": "^2.1.3",
32-
"ts-loader": "^6.2.2",
31+
"thread-loader": "^3.0.0",
32+
"ts-loader": "^8.0.5",
3333
"webpack": "^4.0.0",
3434
"yorkie": "^2.0.0"
3535
},

‎packages/@vue/cli-service/lib/config/app.js

Copy file name to clipboardExpand all lines: packages/@vue/cli-service/lib/config/app.js
+13-15Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -150,18 +150,15 @@ module.exports = (api, options) => {
150150
const multiPageConfig = options.pages
151151
const htmlPath = api.resolve('public/index.html')
152152
const defaultHtmlPath = path.resolve(__dirname, 'index-default.html')
153-
const publicCopyIgnore = ['.DS_Store']
153+
const publicCopyIgnore = ['**/.DS_Store']
154154

155155
if (!multiPageConfig) {
156156
// default, single page setup.
157157
htmlOptions.template = fs.existsSync(htmlPath)
158158
? htmlPath
159159
: defaultHtmlPath
160160

161-
publicCopyIgnore.push({
162-
glob: path.relative(api.resolve('public'), api.resolve(htmlOptions.template)),
163-
matchBase: false
164-
})
161+
publicCopyIgnore.push(api.resolve(htmlOptions.template).replace(/\\/g, '/'))
165162

166163
webpackConfig
167164
.plugin('html')
@@ -225,10 +222,7 @@ module.exports = (api, options) => {
225222
? htmlPath
226223
: defaultHtmlPath
227224

228-
publicCopyIgnore.push({
229-
glob: path.relative(api.resolve('public'), api.resolve(templatePath)),
230-
matchBase: false
231-
})
225+
publicCopyIgnore.push(api.resolve(templatePath).replace(/\\/g, '/'))
232226

233227
// inject html plugin for the page
234228
const pageHtmlOptions = Object.assign(
@@ -295,12 +289,16 @@ module.exports = (api, options) => {
295289
if (!isLegacyBundle && fs.existsSync(publicDir)) {
296290
webpackConfig
297291
.plugin('copy')
298-
.use(require('copy-webpack-plugin'), [[{
299-
from: publicDir,
300-
to: outputDir,
301-
toType: 'dir',
302-
ignore: publicCopyIgnore
303-
}]])
292+
.use(require('copy-webpack-plugin'), [{
293+
patterns: [{
294+
from: publicDir,
295+
to: outputDir,
296+
toType: 'dir',
297+
globOptions: {
298+
ignore: publicCopyIgnore
299+
}
300+
}]
301+
}])
304302
}
305303
})
306304
}

‎packages/@vue/cli-service/lib/config/base.js

Copy file name to clipboardExpand all lines: packages/@vue/cli-service/lib/config/base.js
+13-6Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,24 @@ module.exports = (api, options) => {
1414
)
1515
}
1616

17+
// try to load vue in the project
18+
// fallback to peer vue package in the instant prototyping environment
19+
const vue = loadModule('vue', api.service.context) || loadModule('vue', __dirname)
20+
let supportsEsModuleAsset = true
21+
if (vue && semver.major(vue.version) === 2) {
22+
supportsEsModuleAsset = false
23+
}
24+
1725
const genUrlLoaderOptions = dir => {
1826
return {
1927
limit: inlineLimit,
28+
esModule: supportsEsModuleAsset,
2029
// use explicit fallback to avoid regression in url-loader>=1.1.0
2130
fallback: {
2231
loader: require.resolve('file-loader'),
2332
options: {
24-
name: genAssetSubPath(dir)
33+
name: genAssetSubPath(dir),
34+
esModule: supportsEsModuleAsset
2535
}
2636
}
2737
}
@@ -69,10 +79,6 @@ module.exports = (api, options) => {
6979
// js is handled by cli-plugin-babel ---------------------------------------
7080

7181
// vue-loader --------------------------------------------------------------
72-
// try to load vue in the project
73-
// fallback to peer vue package in the instant prototyping environment
74-
const vue = loadModule('vue', api.service.context) || loadModule('vue', __dirname)
75-
7682
if (vue && semver.major(vue.version) === 2) {
7783
// for Vue 2 projects
7884
const vueLoaderCacheConfig = api.genCacheConfig('vue-loader', {
@@ -170,7 +176,8 @@ module.exports = (api, options) => {
170176
.use('file-loader')
171177
.loader(require.resolve('file-loader'))
172178
.options({
173-
name: genAssetSubPath('img')
179+
name: genAssetSubPath('img'),
180+
esModule: supportsEsModuleAsset
174181
})
175182

176183
webpackConfig.module

‎packages/@vue/cli-service/package.json

Copy file name to clipboardExpand all lines: packages/@vue/cli-service/package.json
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@
4646
"cli-highlight": "^2.1.4",
4747
"clipboardy": "^2.3.0",
4848
"cliui": "^6.0.0",
49-
"copy-webpack-plugin": "^5.1.1",
49+
"copy-webpack-plugin": "^6.2.1",
5050
"css-loader": "^3.5.3",
5151
"cssnano": "^4.1.10",
5252
"debug": "^4.1.1",
5353
"default-gateway": "^6.0.2",
5454
"dotenv": "^8.2.0",
5555
"dotenv-expand": "^5.1.0",
56-
"file-loader": "^4.2.0",
56+
"file-loader": "^6.1.1",
5757
"fs-extra": "^7.0.1",
5858
"globby": "^9.2.0",
5959
"hash-sum": "^2.0.0",
@@ -68,8 +68,8 @@
6868
"portfinder": "^1.0.26",
6969
"postcss-loader": "^3.0.0",
7070
"ssri": "^8.0.0",
71-
"terser-webpack-plugin": "^2.3.6",
72-
"thread-loader": "^2.1.3",
71+
"terser-webpack-plugin": "^4.2.3",
72+
"thread-loader": "^3.0.0",
7373
"url-loader": "^2.2.0",
7474
"vue-loader": "^15.9.2",
7575
"vue-style-loader": "^4.1.2",

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.