-
Notifications
You must be signed in to change notification settings - Fork 1
/
rollup.conf.js
35 lines (33 loc) · 878 Bytes
/
rollup.conf.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
import path from 'path'
import buble from 'rollup-plugin-buble'
import cjs from 'rollup-plugin-commonjs'
import builtins from 'rollup-plugin-node-builtins';
import globals from 'rollup-plugin-node-globals'
import replace from 'rollup-plugin-replace'
import resolve from 'rollup-plugin-node-resolve'
import less from 'rollup-plugin-less';
import alias from 'rollup-plugin-alias';
export default {
input: './src/index.js',
output: {
file: './build/index.js',
format: 'iife'
},
plugins: [
resolve({jsnext: true}),
less({
output: './build/index.css'
}),
alias({
_: path.resolve(__dirname, './src')
}),
cjs({
include: 'node_modules/**'
}),
buble(),
globals(),
builtins(),
replace({ 'process.env.NODE_ENV': JSON.stringify('development') , 'React.createElement': 'preact.h'})
],
sourcemap: true
}