You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

17 lines
385 B

module.exports = ({ config }, options) => {
const rule = config.module
.rule('compile')
.test(options.test || /\.jsx?$/)
.use('babel')
.loader(require.resolve('babel-loader'))
.options(options.babel)
.end();
if (options.include) {
rule.include.merge(options.include);
}
if (options.exclude) {
rule.exclude.merge(options.exclude);
}
};