-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBrocfile.js
30 lines (26 loc) · 835 Bytes
/
Brocfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
const mergeTrees = require('broccoli-merge-trees');
const esTranspiler = require('broccoli-babel-transpiler');
const resolve = require('rollup-plugin-node-resolve');
const Rollup = require('broccoli-rollup');
const makeRollupConfig = require('./rollup.configfactory');
let es = 'src';
let bundledModule = new Rollup(es, {
rollup: makeRollupConfig('index.js', 'sequins.mjs'),
});
let bundledCJS = new Rollup(es, {
rollup: makeRollupConfig('index.js', 'sequins.js', {
plugins: [
[
'@babel/plugin-transform-runtime',
{
useESModules: false,
},
],
],
}),
});
bundledCJS = esTranspiler(bundledCJS, {
filterExtensions: ['js'],
plugins: ['@babel/plugin-transform-modules-commonjs'],
});
module.exports = mergeTrees([bundledModule, bundledCJS, 'compat', 'type-definitions']);