You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 26, 2018. It is now read-only.
ReferenceError: [BABEL] item.vue: Unknown option: foreign._. Check out http://babeljs.io/docs/usage/options/ for more information about options.
A common cause of this error is the presence of a configuration options object without the corresponding preset name.
Vueify in vueify/lib/compilers/babel.js passes options to babel.transform(raw, options) in wrong format presets: { _: [ 'env' ] } which is created by minimist via subarg in browserify instead of correct format presets: [ 'env' ].
For example babelify transform works well with the similar command: $ browserify -t [ babelify --presets [ env ] ] -e main.js -o build.js
... this syntax comes directly from babelify doc at npmjs.com
In babelify it is working thanks to following code in babelify/index.js in Babelify.configure():
// add this after line "`var babel = require('babel-core')"varopts=compiler.options.babelif(opts){deleteopts._// "--opt [ a b ]" and "--opt a --opt b" are allowed:if(opts.ignore&&opts.ignore._)opts.ignore=opts.ignore._if(opts.only&&opts.only._)opts.only=opts.only._if(opts.plugins&&opts.plugins._)opts.plugins=opts.plugins._if(opts.presets&&opts.presets._)opts.presets=opts.presets._}