forked from rpl/dev-webext-permissions-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
34 lines (32 loc) · 857 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
33
34
/* eslint-env node */
import alias from "rollup-plugin-alias";
import babel from "rollup-plugin-babel";
import commonjs from "rollup-plugin-commonjs";
import resolve from "rollup-plugin-node-resolve";
export default {
// entry: 'src/main.js',
plugins: [
alias({
assert: `${process.cwd()}/src/shims/assert.js`
}),
// Resolve external modules as part of the tree-shaking bundling.
resolve({
jsnext: true,
main: true,
browser: true,
preferBuiltins: true
}),
// Enable loading commonjs modules by converting them into ES& modules.
commonjs({
include: "node_modules/**"
}),
// Pass through babel (and transpile nanohtml into js code at build time)
babel({
// only transpile our source code
exclude: "node_modules/**"
})
],
output: {
format: "iife"
}
};