vuejs / vueify

Browserify transform for single-file Vue components
MIT License
1.17k stars 152 forks source link

Fix: invalid warning about babel #183

Closed mysticatea closed 7 years ago

mysticatea commented 7 years ago

In the following code and no .babelrc, vueify prints an error message wrongly based on unused default options. This PR fixes the problem.

browserify(entryFile)
    .transform("vueify", { babel: { /* some settings */ } })
    .bundle()
    .pipe(output)
You are trying to use "babel". babel-preset-es2015 and babel-plugin-transform-runtime is missing.

To install run:
npm install --save-dev babel-preset-es2015 babel-plugin-transform-runtime

^^^ You are seeing this because you are using Vueify's default babel configuration. You can override this with .babelrc or the babel option in vue.config.js.

This PR related to the line /lib/compilers/babel.js#L47.

mysticatea commented 7 years ago

Thank you!