A prepackager for fisx to extract the used babel helper api code to a file when using babel-plugin-external-helpers plugin.
npm install fisx-prepackager-babel --save-dev
// specify the used babel
fis.require('prepackager-babel').babel = require('babel-core');
fis.match('::package', {
prepackager: fis.plugin('babel')
});
Add the babelHelpers
module variable declaration in compiled babel file, use fisx-preprocessor-babel plugin.
-
babelHelperFileName -
string
optional
: define the output babel helper file name, by defaultsrc/babelHelpers.js
-
babelHelperFileOption -
Object
optional
: specify the output babel helper fis file option, the detail options refer fisFile
class