forked from pwa-note/pwa-note
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
39 lines (39 loc) · 913 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
35
36
37
38
39
const typescript = require('rollup-plugin-typescript2')
const commonjs = require('rollup-plugin-commonjs')
const nodeResolve = require('rollup-plugin-node-resolve')
module.exports = [{
input: 'src/index.ts',
plugins: [
nodeResolve(),
commonjs(),
typescript()
],
onwarn: function(warning) {
switch (warning.code) {
case 'THIS_IS_UNDEFINED': return;
}
console.warn( warning.message );
},
output: {
sourcemap: true,
file: 'bundle.js',
format: 'iife'
}
}, {
input: 'src/sw.ts',
plugins: [
typescript(),
nodeResolve(),
commonjs()
],
onwarn: function(warning) {
switch (warning.code) {
case 'THIS_IS_UNDEFINED': return;
}
console.warn( warning.message );
},
output: {
file: 'sw.js',
format: 'iife'
}
}]