forked from jcubic/lips
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
46 lines (45 loc) · 1.23 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import commonjs from "rollup-plugin-commonjs";
import nodeResolve from "rollup-plugin-node-resolve";
import babel from "rollup-plugin-babel";
export default {
input: "src/lips.js",
output: {
name: "lib",
file: "dist/lips.js",
format: "iife",
globals: {
"@babel/runtime/regenerator": "regeneratorRuntime"
}
},
onwarn: (warning, next) => {
const str = warning.toString();
if (/Use of eval is strongly discouraged/.test(str)) {
return;
}
next(warning);
},
plugins: [
babel({
"babelrc": false,
"runtimeHelpers": true,
"plugins": [
"@babel/plugin-transform-async-to-generator",
"@babel/plugin-transform-regenerator",
["@babel/plugin-transform-runtime", {
"helpers": true,
"regenerator": true
}]
],
"presets": [
"@babel/preset-env"
],
"exclude": "node_modules/**"
}),
nodeResolve({
mainFields: ["jsnext:main"]
}),
commonjs({
include: "node_modules/**"
})
]
};