Skip to content

Commit 9075907

Browse files
committed
fix: do not throw when babel config contains ignore/include/exclude
fixes vuejs#4923
1 parent 7a835df commit 9075907

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ module.exports = (api, options) => {
2424
// try to load the project babel config;
2525
// if the default preset is used,
2626
// there will be a VUE_CLI_TRANSPILE_BABEL_RUNTIME env var set.
27-
babel.loadPartialConfig()
27+
// the `filename` field is required
28+
// in case there're filename-related options like `ignore` in the user config
29+
babel.loadPartialConfig({ filename: api.resolve('src/main.js') })
2830

2931
api.chainWebpack(webpackConfig => {
3032
webpackConfig.resolveLoader.modules.prepend(path.join(__dirname, 'node_modules'))

0 commit comments

Comments
 (0)