-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathrollup.config.js
56 lines (52 loc) · 1019 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import path from 'path';
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import license from 'rollup-plugin-license';
import copy from 'rollup-plugin-copy';
import peerDeps from 'rollup-plugin-peer-deps-external';
const plugins = [
resolve(),
commonjs({ ignore: ['conditional-runtime-dependency'] }),
peerDeps(),
license({
banner: {
file: path.join(__dirname, 'LICENSE')
}
}),
copy({
targets: [
{ src: 'package.json', dest: 'dist/' },
{ src: 'README.md', dest: 'dist/' },
{ src: 'CHANGELOG.md', dest: 'dist/' }
],
outputFolder: 'dist'
})
];
const external = [
'eslint',
'eslint-config-xo',
'eslint-plugin-vue',
'eslint-plugin-unicorn'
];
export default [
{
input: 'src/index.js',
output: {
file: 'dist/index.js',
format: 'cjs',
preferConst: true
},
external,
plugins
},
{
input: 'src/spaces.js',
output: {
file: 'dist/spaces.js',
format: 'cjs',
preferConst: true
},
external,
plugins
}
];