35 lines
793 B
JavaScript
35 lines
793 B
JavaScript
|
const airbnbBase = require('@neutrinojs/airbnb-base');
|
||
|
const library = require('@neutrinojs/library');
|
||
|
const mocha = require('@neutrinojs/mocha');
|
||
|
|
||
|
module.exports = () => ({
|
||
|
options: {},
|
||
|
use: [
|
||
|
(neutrino) => {
|
||
|
neutrino.options.output = '.';
|
||
|
},
|
||
|
airbnbBase({
|
||
|
eslint: {
|
||
|
cache: false,
|
||
|
baseConfig: require(`${__dirname}/.eslint.defaults`),
|
||
|
},
|
||
|
}),
|
||
|
(neutrino) => {
|
||
|
const {name} = neutrino.options.packageJson;
|
||
|
library({
|
||
|
clean: false,
|
||
|
name,
|
||
|
target: 'node',
|
||
|
})(neutrino);
|
||
|
},
|
||
|
(neutrino) => {
|
||
|
const options = neutrino.config.module
|
||
|
.rule('compile')
|
||
|
.use('babel')
|
||
|
.get('options');
|
||
|
options.presets[0][1].targets = {esmodules: true};
|
||
|
},
|
||
|
mocha(),
|
||
|
],
|
||
|
});
|