Skip to content

Commit 5781340

Browse files
committed
chore: merge branch 'dev' into docs [ci skip]
2 parents 7916bb6 + 500a315 commit 5781340

File tree

138 files changed

+3321
-1853
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+3321
-1853
lines changed

.eslintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ module.exports = {
88
env: {
99
"jest": true
1010
},
11+
globals: {
12+
name: 'off'
13+
},
1114
rules: {
1215
"indent": ["error", 2, {
1316
"MemberExpression": "off"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ temp
88
.vuerc
99
.version
1010
.versions
11+
.changelog

CHANGELOG.md

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,126 @@
1+
2+
## 3.6.0 (2019-04-13)
3+
4+
#### :rocket: New Feature
5+
* `@vue/cli-ui`
6+
* [#3688](https://github.com/vuejs/vue-cli/pull/3688) add "copy content to clipboard" button on terminal component ([@pikax](https://github.com/pikax))
7+
* [c81e6c](https://github.com/vuejs/vue-cli/commit/c81e6c21a20d66bfa66a664d94ec3ccc81c54d38) **project create**: bare option ([@Akryum](https://github.com/Akryum))
8+
* [08de713](https://github.com/vuejs/vue-cli/commit/08de713598530bbc85282c6853bffebb912142a3) **plugin add**: feature icons ([@Akryum](https://github.com/Akryum))
9+
* [fbfbd29](https://github.com/vuejs/vue-cli/commit/fbfbd29be5b3c2f07adb1c8db45ba18cd28468a5) vulnerability audit widget ([@Akryum](https://github.com/Akryum))
10+
* [40d9346](https://github.com/vuejs/vue-cli/commit/40d9346914b3416bf3e6265fd020f6be768c9543) **api**: save shared data to disk ([@Akryum](https://github.com/Akryum))
11+
* [ca2bdad](https://github.com/vuejs/vue-cli/commit/ca2bdadb028ee0496e1cf64cca4be2a6cb591547) **tasks**: refresh button ([@Akryum](https://github.com/Akryum))
12+
* `@vue/cli-service`
13+
* [#3703](https://github.com/vuejs/vue-cli/pull/3703) add `--filename` option to specify the output file name ([@NickeyLin](https://github.com/NickeyLin))
14+
* [#3760](https://github.com/vuejs/vue-cli/pull/3760) bundle currentScript polyfill by default if library needs IE support ([@sodatea](https://github.com/sodatea))
15+
* [#3595](https://github.com/vuejs/vue-cli/pull/3595) support multi-main entry in pages config ([@sodatea](https://github.com/sodatea))
16+
* [#3663](https://github.com/vuejs/vue-cli/pull/3663) support pug as html template ([@sodatea](https://github.com/sodatea))
17+
* `@vue/cli`
18+
* [#3568](https://github.com/vuejs/vue-cli/pull/3568) add makeJSOnlyValue to generator API. Provides convenien… ([@steveworkman](https://github.com/steveworkman))
19+
* [#3643](https://github.com/vuejs/vue-cli/pull/3643) do not write undefined fields to config files ([@sodatea](https://github.com/sodatea))
20+
* `@vue/cli-service`, `@vue/cli-shared-utils`, `@vue/cli-ui`, `@vue/cli`
21+
* [#1531](https://github.com/vuejs/vue-cli/pull/1531) support PNPM as a package manager ([@robertkruis](https://github.com/robertkruis))
22+
* [#3790](https://github.com/vuejs/vue-cli/pull/3790) fix PNPM compatibility issues during scaffolding ([@sodatea](https://github.com/sodatea))
23+
* `@vue/cli-plugin-eslint`, `@vue/cli-service`
24+
* [#3572](https://github.com/vuejs/vue-cli/pull/3572) add 3rd option to `lintOnSave` to support 'default' behaviour (Closes [#3552](https://github.com/vuejs/vue-cli/issues/3552)) ([@LinusBorg](https://github.com/LinusBorg))
25+
* `@vue/cli-plugin-unit-jest`
26+
* [#3589](https://github.com/vuejs/vue-cli/pull/3589) add jest typeahead plugin ([@sodatea](https://github.com/sodatea))
27+
28+
#### :bug: Bug Fix
29+
* `@vue/cli-ui`
30+
* [8c3ff11](https://github.com/vuejs/vue-cli/commit/8c3ff1165384bf4bafca39a267e3da3d9821abdb) **project create**: run vue create in child process, closes #3664 ([@Akryum](https://github.com/Akryum))
31+
* [dac7a4b](https://github.com/vuejs/vue-cli/commit/dac7a4bf743a42befb119c1b0ab7992c73fec766) **project manager**: ake open in editor button more discoverable ([@Akryum](https://github.com/Akryum))
32+
* [fd9cb16](https://github.com/vuejs/vue-cli/commit/fd9cb1628e04cd30a01cab0b5591bab7669768d7) **widget**: make resize handles more visible ([@Akryum](https://github.com/Akryum))
33+
* [c4bd1ab](https://github.com/vuejs/vue-cli/commit/c4bd1abea80fbd30d359812da8f88b12e9fca48b) set cache-control header on static files ([@Akryum](https://github.com/Akryum))
34+
35+
#### :house: Internal
36+
* `@vue/cli-service`
37+
* [#2405](https://github.com/vuejs/vue-cli/pull/2405) remove unused `placeAtRootIfRelative` parameter ([@dailyvuejs](https://github.com/dailyvuejs))
38+
* [#3707](https://github.com/vuejs/vue-cli/pull/3707) more accurate vim swap file ignore ([@Newbrict](https://github.com/Newbrict))
39+
* [#3709](https://github.com/vuejs/vue-cli/pull/3709) use high resolution version of favicon.ico ([@phanan](https://github.com/phanan))
40+
* [#3628](https://github.com/vuejs/vue-cli/pull/3628) make `fibers` opt-in for dart sass ([@sodatea](https://github.com/sodatea))
41+
* `@vue/cli-ui`
42+
* [#3778](https://github.com/vuejs/vue-cli/pull/3778) **refactor(plugin)**: invoke is now done in child process ([@Akryum](https://github.com/Akryum))
43+
* [4f0286c](https://github.com/vuejs/vue-cli/commit/4f0286c5535e87d5303feed52ba662082ef0296b) **perf(webpack dashboard)**: cleaning the analyzer data ([@Akryum](https://github.com/Akryum))
44+
* [ecd64c4](https://github.com/vuejs/vue-cli/commit/ecd64c43a620a3573ee37e933cac0e8429f009c1) **perf(task details)**: better defering ([@Akryum](https://github.com/Akryum))
45+
* [13199f5](https://github.com/vuejs/vue-cli/commit/13199f52e1e227bc1a720fb95c913564b8241e88) **tasks**: sort ([@Akryum](https://github.com/Akryum))
46+
47+
* Other
48+
* [#3650](https://github.com/vuejs/vue-cli/pull/3650) workflow: use lerna-changelog ([@sodatea](https://github.com/sodatea))
49+
50+
#### Committers: 10
51+
- Carlos Rodrigues ([@pikax](https://github.com/pikax))
52+
- Dimitar Dimitrov ([@Newbrict](https://github.com/Newbrict))
53+
- Guillaume Chau ([@Akryum](https://github.com/Akryum))
54+
- Haoqun Jiang ([@sodatea](https://github.com/sodatea))
55+
- Nick ([@NickeyLin](https://github.com/NickeyLin))
56+
- Phan An ([@phanan](https://github.com/phanan))
57+
- Steve Workman ([@steveworkman](https://github.com/steveworkman))
58+
- Thorsten Lünborg ([@LinusBorg](https://github.com/LinusBorg))
59+
- [@dailyvuejs](https://github.com/dailyvuejs)
60+
- [@robertkruis](https://github.com/robertkruis)
61+
62+
63+
# [3.5.5](https://github.com/vuejs/vue-cli/compare/v3.5.4...v3.5.5) (2019-04-01)
64+
65+
## babel-preset-app
66+
67+
#### Reverts
68+
69+
* "fix: should not add polyfills from transform-runtime plugin ([#3730](https://github.com/vuejs/vue-cli/issues/3730))" ([#3742](https://github.com/vuejs/vue-cli/issues/3742)) ([7228146](https://github.com/vuejs/vue-cli/commit/7228146)), closes [#3741](https://github.com/vuejs/vue-cli/issues/3741)
70+
71+
72+
73+
# [3.5.4](https://github.com/vuejs/vue-cli/compare/v3.5.3...v3.5.4) (2019-03-31)
74+
75+
## babel-preset-app
76+
77+
#### Bug Fixes
78+
79+
* should not add polyfills from transform-runtime plugin ([#3730](https://github.com/vuejs/vue-cli/issues/3730)) ([b987969](https://github.com/vuejs/vue-cli/commit/b987969))
80+
* should not use abosulte polyfill paths when `absoluteRuntime` is on ([#3732](https://github.com/vuejs/vue-cli/issues/3732)) ([9bdff3b](https://github.com/vuejs/vue-cli/commit/9bdff3b)), closes [#3725](https://github.com/vuejs/vue-cli/issues/3725)
81+
82+
## cli-plugin-babel
83+
84+
#### Bug Fixes
85+
86+
* **generator:** add core-js as direct dependency of generated projects ([#3736](https://github.com/vuejs/vue-cli/issues/3736)) ([5eb1425](https://github.com/vuejs/vue-cli/commit/5eb1425))
87+
88+
89+
90+
# [3.5.3](https://github.com/vuejs/vue-cli/compare/v3.5.2...v3.5.3) (2019-03-27)
91+
92+
## babel-preset-app
93+
94+
#### Bug Fixes
95+
96+
* downgrade [@babel](https://github.com/babel)/preset-env temporarily ([#3716](https://github.com/vuejs/vue-cli/issues/3716)) ([f107623](https://github.com/vuejs/vue-cli/commit/f107623))
97+
98+
## cli-service
99+
100+
#### Bug Fixes
101+
102+
* properly load non-js config files in genCacheConfig ([#3632](https://github.com/vuejs/vue-cli/issues/3632)) ([adac48d](https://github.com/vuejs/vue-cli/commit/adac48d)), closes [#3631](https://github.com/vuejs/vue-cli/issues/3631)
103+
* set the path of safari-no-module-fix.js correctly ([#3647](https://github.com/vuejs/vue-cli/issues/3647)) ([10296ff](https://github.com/vuejs/vue-cli/commit/10296ff)), closes [#3033](https://github.com/vuejs/vue-cli/issues/3033)
104+
105+
106+
107+
# [3.5.2](https://github.com/vuejs/vue-cli/compare/v3.5.1...v3.5.2) (2019-03-27)
108+
109+
## babel-preset-app
110+
111+
#### Bug Fixes
112+
113+
* use absolute import path for injected core-js polyfills ([#3710](https://github.com/vuejs/vue-cli/issues/3710)) ([4d6fcf5](https://github.com/vuejs/vue-cli/commit/4d6fcf5)), closes [#3678](https://github.com/vuejs/vue-cli/issues/3678)
114+
* explicitly set corejs version for [@babel](https://github.com/babel)/preset-env ([#3696](https://github.com/vuejs/vue-cli/issues/3696)) ([156ef21](https://github.com/vuejs/vue-cli/commit/156ef21)), closes [#3695](https://github.com/vuejs/vue-cli/issues/3695)
115+
116+
## docs
117+
118+
#### Features
119+
120+
* add manifest.json, make the website installable ([eda048a](https://github.com/vuejs/vue-cli/commit/eda048a))
121+
122+
123+
1124
# [3.5.1](https://github.com/vuejs/vue-cli/compare/v3.5.0...v3.5.1) (2019-03-12)
2125

3126
## cli-service

docs/config/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,16 @@ Deprecated since Vue CLI 3.3, please use [`publicPath`](#publicPath) instead.
140140

141141
### lintOnSave
142142

143-
- Type: `boolean | 'error'`
143+
- Type: `boolean | 'warning' | 'default' | 'error'`
144144
- Default: `true`
145145

146146
Whether to perform lint-on-save during development using [eslint-loader](https://github.com/webpack-contrib/eslint-loader). This value is respected only when [`@vue/cli-plugin-eslint`](https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint) is installed.
147147

148-
When set to `true`, `eslint-loader` will emit lint errors as warnings. By default, warnings are only logged to the terminal and does not fail the compilation.
148+
When set to `true` or `'warning'`, `eslint-loader` will emit lint errors as warnings. By default, warnings are only logged to the terminal and does not fail the compilation, so this is a good default for development.
149149

150-
To make lint errors show up in the browser overlay, you can use `lintOnSave: 'error'`. This will force `eslint-loader` to always emit errors. this also means lint errors will now cause the compilation to fail.
150+
To make lint errors show up in the browser overlay, you can use `lintOnSave: 'default'`. This will force `eslint-loader` to actually emit errors. this also means lint errors will now cause the compilation to fail.
151+
152+
Setting it to `'errors'` will force eslint-loader to emit warnings as errors as well, which means warnings will also show up in the overlay.
151153

152154
Alternatively, you can configure the overlay to display both warnings and errors:
153155

docs/dev-guide/generator-api.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,14 @@ Add a message to be printed when the generator exits (after any other standard m
9797
- **Usage**:
9898
Convenience method for generating a JS config file from JSON
9999

100+
## makeJSOnlyValue
101+
102+
- **Arguments**
103+
- `{any} str` - JS expression as a string
104+
105+
- **Usage**:
106+
Turns a string expression into executable JS for .js config files
107+
100108
## injectImports
101109

102110
- **Arguments**

docs/guide/build-targets.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ App is the default build target. In this mode:
1313

1414
## Library
1515

16-
::: tip Note on IE Compatibility
17-
In lib mode, the public path is [dynamically determined](https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/cli-service/lib/commands/build/setPublicPath.js) based on the URL from which the main js file is loaded (to enable dynamic assets loading). However, this feature requires `document.currentScript` support, which is missing in IE. So it's recommended to include the [current-script-polyfill](https://www.npmjs.com/package/current-script-polyfill) in the final web page before the library is imported, if IE support is a requirement.
18-
:::
19-
2016
::: tip Note on Vue Dependency
2117
In lib mode, Vue is *externalized*. This means the bundle will not bundle Vue even if your code imports Vue. If the lib is used via a bundler, it will attempt to load Vue as a dependency through the bundler; otherwise, it falls back to a global `Vue` variable.
2218
:::

docs/guide/css.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ You can select pre-processors (Sass/Less/Stylus) when creating the project. If y
1212

1313
``` bash
1414
# Sass
15-
npm install -D sass-loader node-sass
15+
npm install -D sass-loader sass
1616

1717
# Less
1818
npm install -D less-loader less
@@ -29,6 +29,14 @@ $color: red;
2929
</style>
3030
```
3131

32+
::: tip A Tip on Sass Performance
33+
Note that when using Dart Sass, **synchronous compilation is twice as fast as asynchronous compilation** by default, due to the overhead of asynchronous callbacks. To avoid this overhead, you can use the [fibers](https://www.npmjs.com/package/fibers) package to call asynchronous importers from the synchronous code path. To enable this, simply install `fibers` as a project dependency:
34+
```
35+
npm install -D fibers
36+
```
37+
Please also be aware, as it's a native module, there may be compatibility issues vary on the OS and build environment. In that case, please run `npm uninstall -D fibers` to fix the problem.
38+
:::
39+
3240
### Automatic imports
3341

3442
If you want to automatically import files (for colors, variables, mixins...), you can use the [style-resources-loader](https://github.com/yenshih/style-resources-loader). Here is an example for stylus that imports `./src/styles/imports.styl` in every SFC and every stylus files:

lerna.json

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
11
{
22
"npmClient": "yarn",
33
"useWorkspaces": false,
4-
"version": "3.5.1",
4+
"version": "3.6.0",
55
"packages": [
66
"packages/@vue/babel-preset-app",
77
"packages/@vue/cli*"
8-
]
8+
],
9+
"changelog": {
10+
"repo": "vuejs/vue-cli",
11+
"labels": {
12+
"PR: New Feature": ":rocket: New Feature",
13+
"PR: Breaking Change": ":boom: Breaking Change",
14+
"PR: Bug Fix": ":bug: Bug Fix",
15+
"PR: Documentation": ":memo: Documentation",
16+
"PR: Internal": ":house: Internal",
17+
"PR: Underlying Tools": ":hammer: Underlying Tools"
18+
},
19+
"cacheDir": ".changelog",
20+
"nextVersionFromMetadata": true
21+
}
922
}

package.json

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"sync": "node scripts/syncDeps.js",
1515
"boot": "node scripts/bootstrap.js",
1616
"release": "yarn --pure-lockfile && yarn clean && node scripts/release.js",
17-
"changelog": "node scripts/genChangelog.js run",
17+
"version": "node scripts/markVersions.js && node scripts/genChangelog.js && git add packages/vue-cli-version-marker CHANGELOG.md",
1818
"docs": "vuepress dev docs",
1919
"docs:build": "vuepress build docs",
2020
"patch-chromedriver": "node scripts/patchChromedriver.js"
@@ -43,46 +43,42 @@
4343
]
4444
},
4545
"devDependencies": {
46-
"@vue/conventional-changelog": "^0.1.1",
4746
"@vuepress/plugin-pwa": "^1.0.0-alpha.44",
4847
"@vuepress/theme-vue": "1.0.0-alpha.44",
4948
"babel-core": "7.0.0-bridge.0",
5049
"babel-eslint": "^10.0.1",
51-
"conventional-changelog": "^3.0.6",
5250
"debug": "^4.1.0",
53-
"eslint": "^5.14.1",
51+
"eslint": "^5.16.0",
5452
"eslint-plugin-graphql": "^3.0.3",
5553
"eslint-plugin-node": "^8.0.0",
5654
"eslint-plugin-vue": "^5.2.2",
5755
"eslint-plugin-vue-libs": "^3.0.0",
5856
"execa": "^1.0.0",
59-
"globby": "^9.0.0",
60-
"graphql": "^14.0.2",
57+
"globby": "^9.2.0",
58+
"graphql": "^14.2.1",
6159
"http-server": "^0.11.1",
6260
"inquirer": "^6.0.0",
6361
"jest": "^23.1.0",
64-
"lerna": "^3.13.0",
65-
"lint-staged": "^8.1.4",
62+
"lerna": "^3.13.2",
63+
"lerna-changelog": "^0.8.2",
64+
"lint-staged": "^8.1.5",
6665
"memfs": "^2.15.2",
6766
"minimist": "^1.2.0",
6867
"request": "^2.83.0",
6968
"request-promise-native": "^1.0.7",
7069
"rimraf": "^2.6.2",
71-
"semver": "^5.5.0",
72-
"typescript": "^3.3.3333",
70+
"semver": "^6.0.0",
71+
"typescript": "^3.4.3",
7372
"vuepress": "1.0.0-alpha.44",
7473
"vuepress-theme-vue": "^1.1.0",
7574
"webpack": ">=4 < 4.29",
7675
"yorkie": "^2.0.0"
7776
},
7877
"resolutions": {
79-
"@babel/core": "^7.0.0",
80-
"@babel/preset-env": "^7.0.0",
8178
"babel-core": "7.0.0-bridge.0",
82-
"ps-tree": "^1.1.1",
8379
"puppeteer": "1.11.0",
84-
"vue": "^2.6.7",
85-
"vue-template-compiler": "^2.6.7",
86-
"vue-server-renderer": "^2.6.7"
80+
"vue": "^2.6.10",
81+
"vue-template-compiler": "^2.6.10",
82+
"vue-server-renderer": "^2.6.10"
8783
}
8884
}

packages/@vue/babel-preset-app/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Use this option when you have 3rd party dependencies that are not processed by B
8888

8989
- Default: `true`.
9090

91-
Set to `false` to disable JSX support.
91+
Set to `false` to disable JSX support. Or you can toggle [@vue/babel-preset-jsx](https://github.com/vuejs/jsx/tree/dev/packages/babel-preset-jsx) features here.
9292

9393
### loose
9494

packages/@vue/babel-preset-app/__tests__/babel-preset.spec.js

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ const defaultOptions = {
77
filename: 'test-entry-file.js'
88
}
99

10+
const genCoreJSImportRegExp = mod => {
11+
// expected to include a `node_modules` in the import path because we use absolute path for core-js
12+
return new RegExp(`import "${['.*node_modules', 'core-js', 'modules', mod].join(`[\\${path.sep}]+`)}`)
13+
}
14+
1015
beforeEach(() => {
1116
process.env.VUE_CLI_ENTRY_FILES = JSON.stringify([path.join(process.cwd(), 'test-entry-file.js')])
1217
})
@@ -22,9 +27,9 @@ test('polyfill detection', () => {
2227
filename: 'test-entry-file.js'
2328
})
2429
// default includes
25-
expect(code).not.toMatch(`import "core-js/modules/es6.promise"`)
30+
expect(code).not.toMatch(genCoreJSImportRegExp('es6.promise'))
2631
// usage-based detection
27-
expect(code).not.toMatch(`import "core-js/modules/es6.map"`)
32+
expect(code).not.toMatch(genCoreJSImportRegExp('es6.map'))
2833

2934
;({ code } = babel.transformSync(`
3035
const a = new Map()
@@ -36,9 +41,9 @@ test('polyfill detection', () => {
3641
filename: 'test-entry-file.js'
3742
}))
3843
// default includes
39-
expect(code).toMatch(`import "core-js/modules/es6.promise"`)
44+
expect(code).toMatch(genCoreJSImportRegExp('es6.promise'))
4045
// promise polyfill alone doesn't work in IE, needs this as well. fix: #1642
41-
expect(code).toMatch(`import "core-js/modules/es6.array.iterator"`)
46+
expect(code).toMatch(genCoreJSImportRegExp('es6.array.iterator'))
4247
// usage-based detection
4348
expect(code).toMatch(/import _Map from ".*runtime-corejs2\/core-js\/map"/)
4449
})
@@ -56,7 +61,7 @@ test('modern mode always skips polyfills', () => {
5661
filename: 'test-entry-file.js'
5762
})
5863
// default includes
59-
expect(code).not.toMatch(`import "core-js/modules/es6.promise"`)
64+
expect(code).not.toMatch(genCoreJSImportRegExp('es6.promise'))
6065
// usage-based detection
6166
expect(code).not.toMatch(/import _Map from ".*runtime-corejs2\/core-js\/map"/)
6267

@@ -71,7 +76,7 @@ test('modern mode always skips polyfills', () => {
7176
filename: 'test-entry-file.js'
7277
}))
7378
// default includes
74-
expect(code).not.toMatch(`import "core-js/modules/es6.promise"`)
79+
expect(code).not.toMatch(genCoreJSImportRegExp('es6.promise'))
7580
// usage-based detection
7681
expect(code).not.toMatch(/import _Map from ".*runtime-corejs2\/core-js\/map"/)
7782
delete process.env.VUE_CLI_MODERN_BUILD
@@ -98,7 +103,7 @@ test('async/await', () => {
98103
}
99104
hello()
100105
`.trim(), defaultOptions)
101-
expect(code).toMatch(`import "core-js/modules/es6.promise"`)
106+
expect(code).toMatch(genCoreJSImportRegExp('es6.promise'))
102107
// should use regenerator runtime
103108
expect(code).toMatch(`import "regenerator-runtime/runtime"`)
104109
// should use required helper instead of inline
@@ -148,4 +153,5 @@ test('disable absoluteRuntime', () => {
148153
})
149154

150155
expect(code).toMatch('import _toConsumableArray from "@babel/runtime-corejs2/helpers/esm/toConsumableArray"')
156+
// expect(code).not.toMatch(genCoreJSImportRegExp('es6.promise'))
151157
})

packages/@vue/babel-preset-app/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,10 @@ module.exports = (context, options = {}) => {
106106
ignoreBrowserslistConfig,
107107
configPath
108108
})
109-
plugins.push([require('./polyfillsPlugin'), { polyfills, entryFiles }])
109+
plugins.push([
110+
require('./polyfillsPlugin'),
111+
{ polyfills, entryFiles, useAbsolutePath: !!absoluteRuntime }
112+
])
110113
} else {
111114
polyfills = []
112115
}

0 commit comments

Comments
 (0)