forked from alpinejs/alpine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup-ie11.config.js
55 lines (54 loc) · 1.68 KB
/
rollup-ie11.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
import babel from 'rollup-plugin-babel';
import filesize from 'rollup-plugin-filesize';
import resolve from 'rollup-plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import multi from '@rollup/plugin-multi-entry';
import replace from '@rollup/plugin-replace';
import pkg from './package.json';
import stripCode from 'rollup-plugin-strip-code';
export default {
input: ['src/polyfills.js', 'src/index.js'],
output: {
name: 'Alpine',
file: 'dist/alpine-ie11.js',
format: 'umd',
},
plugins: [
multi(),
commonjs(),
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(),
stripCode({
start_comment: 'MODERN-ONLY:START',
end_comment: 'MODERN-ONLY:END'
}),
babel({
babelrc: false,
exclude: 'node_modules/**',
presets: [
[
"@babel/preset-env",
{
targets: {
browsers: "> 0.5%, ie >= 11"
},
modules: false,
spec: true,
useBuiltIns: "usage",
forceAllTransforms: true,
corejs: {
version: 3,
proposals: false
}
}
]
]
})
]
}