File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ afterAll(async () => {
77
77
} )
78
78
79
79
test ( 'dep from node_modules should not been transpiled by default' , async ( ) => {
80
+ await project . write ( 'vue.config.js' , `module.exports = {}` )
80
81
await project . run ( 'vue-cli-service build' )
81
82
expect ( await readLegacyVendorFile ( ) ) . toMatch ( '() => "__TEST__"' )
82
83
} )
Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ module.exports = api => {
9
9
babel : {
10
10
presets : [ '@vue/cli-plugin-babel/preset' ]
11
11
} ,
12
+ vue : {
13
+ transpileDependencies : true
14
+ } ,
12
15
dependencies : {
13
16
'core-js' : '^3.8.3'
14
17
}
Original file line number Diff line number Diff line change @@ -240,10 +240,8 @@ module.exports = class Generator {
240
240
extract ( key )
241
241
}
242
242
} else {
243
- if ( ! process . env . VUE_CLI_TEST ) {
244
- // by default, always extract vue.config.js
245
- extract ( 'vue' )
246
- }
243
+ // by default, always extract vue.config.js
244
+ extract ( 'vue' )
247
245
// always extract babel.config.js as this is the only way to apply
248
246
// project-wide configuration even to dependencies.
249
247
// TODO: this can be removed when Babel supports root: true in package.json
You can’t perform that action at this time.
0 commit comments