glov-build-babel
v1.0.4
Published
Babel task processor for glov-build
Downloads
28
Readme
Babel task processor for glov-build
Installation requires also installing @babel/core and related modules.
npm install --save-dev glov-build-babel @babel/core @babel/preset-env
API usage:
const babel = require('glov-build-babel');
gb.task({
name: ...,
input: ...,
...babel(options),
});
Options
babel
- optional options object to pass tobabel
sourcemap
- optional options object to pass toglov-build-sourcemap
Example usage:
const babel = require('glov-build-babel');
gb.task({
name: 'client_js_babel_files',
input: ['client/**/*.js','common/**/*.js'],
target: 'dev',
...babel({
sourcemap: {
inline: true,
},
babel: {
babelrc: false,
presets: [['@babel/env', {
targets: {
ie: '10'
},
loose: true,
}]],
plugins: [
['some-babel-plugin', {}],
]
}
})
});