Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.tap(options => merge({
plugins: [
[require.resolve('@babel/plugin-proposal-decorators'), {legacy: true}],
[require.resolve('@babel/plugin-proposal-class-properties'), {loose: true}],
require.resolve('@babel/plugin-transform-classes'),
[require.resolve('@babel/plugin-transform-regenerator'), {asyncGenerators: false}],
require.resolve('@babel/plugin-transform-runtime')
]
}, options));
}
.tap(existing =>
compile.merge(existing, {
plugins: [
...(options.polyfills.async
? [[require.resolve('fast-async'), { spec: true }]]
: []),
require.resolve('babel-plugin-dynamic-import-node'),
],
presets: [
[
'babel-preset-env',
{
debug: neutrino.options.debug,
targets: { node: '6.10' },
modules: false,
useBuiltIns: true,
exclude: options.polyfills.async
? ['transform-regenerator', 'transform-async-to-generator']
.tap(options => merge(options, {
presets: [
['babel-preset-env', {
targets: {
ie: 9
},
useBuiltIns: false,
modules: false
}]
]
}));
}