Skip to content
This repository was archived by the owner on Dec 26, 2018. It is now read-only.

Commit 15c99ed

Browse files
committed
better babel warning
1 parent 615dded commit 15c99ed

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

lib/compilers/babel.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,16 @@ function getBabelRc () {
2424
}
2525

2626
if (babelOptions === defaultBabelOptions) {
27-
ensureRequire('babel', ['babel-preset-es2015', 'babel-runtime', 'babel-plugin-transform-runtime'])
27+
try {
28+
ensureRequire('babel', ['babel-preset-es2015', 'babel-runtime', 'babel-plugin-transform-runtime'])
29+
} catch (e) {
30+
console.error(e.message)
31+
console.error(
32+
'\n^^^ You are seeing this because you are using Vueify\'s default babel ' +
33+
'configuration. You can override this with .babelrc or the babel option ' +
34+
'in vue.config.js.'
35+
)
36+
}
2837
}
2938

3039
module.exports = function (raw, cb) {

0 commit comments

Comments
 (0)