Skip to content

Commit 0b17496

Browse files
build(rollup.config.js): use rollup for browser builds
1 parent ad8f1d4 commit 0b17496

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

rollup.config.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { minify } from 'uglify-es'
2+
import cjs from 'rollup-plugin-commonjs'
3+
import uglify from 'rollup-plugin-uglify'
4+
5+
const env = !process.env.ROLLUP_WATCH
6+
7+
export default {
8+
name: 'render',
9+
input: 'lib/index.js',
10+
output: {
11+
file: 'lib/browser.min.js',
12+
format: 'iife',
13+
sourcemap: true
14+
},
15+
plugins: [
16+
cjs(),
17+
env && uglify({}, minify)
18+
]
19+
}

0 commit comments

Comments
 (0)