-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
56 lines (53 loc) · 1.61 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
47
48
49
50
51
52
53
54
55
56
import commonjs from 'rollup-plugin-commonjs';
import resolve from 'rollup-plugin-node-resolve';
export default [{
input: 'src/mochaterial.js',
output: {
file: 'build/mochaterial.mjs',
name: 'Mochaterial',
format: 'esm',
compact: true,
paths: {
'@material/switch/index': 'https://unpkg.com/@material/[email protected]/index.js?module',
'@material/top-app-bar/index': 'https://unpkg.com/@material/[email protected]/index.js?module',
// MDCDrawer requires focus-trap 5, which isn't loadable as an es6 module yet, so we must bundle MDCDrawer...
// Reference Issue: https://github.com/davidtheclark/focus-trap/issues/30
//'@material/drawer/index': 'https://unpkg.com/@material/[email protected]/index.js?module'
}
},
external: [
'https://unpkg.com/[email protected]/dist/stacktrace.min.js',
'@material/switch/index',
'@material/top-app-bar/index',
//'@material/drawer/index'
],
plugins: [
resolve(),
commonjs({
include: [
// node packages for focus-trap and its dependencies
'node_modules/focus-trap/**', 'node_modules/xtend/**', 'node_modules/tabbable/**',
],
})
]
}, {
input: 'src/mochaterial.js',
output: {
file: 'build/umd.mochaterial.js',
name: 'UMD',
format: 'umd',
compact: true,
},
external: [
'https://unpkg.com/[email protected]/dist/stacktrace.min.js',
],
plugins: [
resolve(),
commonjs({
include: [
// node packages for focus-trap and its dependencies
'node_modules/focus-trap/**', 'node_modules/xtend/**', 'node_modules/tabbable/**',
],
})
]
}];