forked from alpinejs/alpine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
32 lines (31 loc) · 932 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
import babel from 'rollup-plugin-babel';
import filesize from 'rollup-plugin-filesize';
import resolve from 'rollup-plugin-node-resolve';
import stripCode from 'rollup-plugin-strip-code';
import replace from '@rollup/plugin-replace';
import pkg from './package.json';
export default {
input: 'src/index.js',
output: {
name: 'Alpine',
file: 'dist/alpine.js',
format: 'umd',
},
plugins: [
replace({
// 'observable-membrane' uses process.env. We don't have that...
"process.env.NODE_ENV": "'production'",
// inject Alpine.js package version number
"process.env.PKG_VERSION": `"${pkg.version}"`
}),
resolve(),
filesize(),
babel({
exclude: 'node_modules/**'
}),
stripCode({
start_comment: 'IE11-ONLY:START',
end_comment: 'IE11-ONLY:END'
})
]
}