Skip to content

Commit 8a09f46

Browse files
committed
add rollup config
1 parent 25cf8f3 commit 8a09f46

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

rollup.config.js

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import babel from 'rollup-plugin-babel'
2+
import resolve from 'rollup-plugin-node-resolve'
3+
4+
const info = require('./package.json')
5+
6+
const config = {
7+
entry: 'src/bricks.js',
8+
plugins: [
9+
resolve(),
10+
babel({
11+
babelrc: false,
12+
presets: [
13+
[
14+
'env', {
15+
modules: false,
16+
targets: {
17+
browsers: ['last 2 versions']
18+
}
19+
}
20+
]
21+
]
22+
})
23+
],
24+
targets: [
25+
{
26+
dest: info.main,
27+
format: 'umd',
28+
moduleName: 'Bricks'
29+
}, {
30+
dest: info.module,
31+
format: 'es'
32+
}
33+
]
34+
}
35+
36+
export default config

0 commit comments

Comments
 (0)