Skip to content

Commit 356eef6

Browse files
committed
fix: babel cache should take browserslist into account
1 parent 128d9d9 commit 356eef6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/@vue/cli-plugin-babel/index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,12 @@ module.exports = (api, options) => {
3030
'@babel/core': require('@babel/core/package.json').version,
3131
'@vue/babel-preset-app': require('@vue/babel-preset-app').version,
3232
'babel-loader': require('babel-loader/package.json').version,
33-
modern: !!process.env.VUE_CLI_MODERN_BUILD
34-
}, 'babel.config.js'))
33+
modern: !!process.env.VUE_CLI_MODERN_BUILD,
34+
browserslist: api.service.pkg.browserslist
35+
}, [
36+
'babel.config.js',
37+
'.browserslistrc'
38+
]))
3539
.end()
3640

3741
if (useThreads) {

0 commit comments

Comments
 (0)