-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
29 lines (26 loc) · 915 Bytes
/
rollup.config.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
const buble = require('rollup-plugin-buble'); // https://buble.surge.sh/guide/
const commonjs = require('rollup-plugin-commonjs'); // https://github.com/rollup/rollup-plugin-commonjs
const eslint = require('rollup-plugin-eslint'); // https://github.com/TrySound/rollup-plugin-eslint
const nodeResolve = require('rollup-plugin-node-resolve'); // https://github.com/rollup/rollup-plugin-node-resolve
const plugins = [
commonjs({ include: 'node_modules/**' }),
nodeResolve({ jsnext: true, main: true }),
eslint(),
buble()
];
const config = require('./package.json');
module.exports = {
entry: 'src/index.js',
exports: 'default',
plugins,
targets: [
{
dest: config.main,
format: 'umd',
moduleName: config.moduleName
}, {
dest: config.module,
format: 'es'
}
]
};