-
-
Notifications
You must be signed in to change notification settings - Fork 29
/
rollup.config.js
74 lines (72 loc) · 1.67 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import typescript from 'rollup-plugin-typescript2';
const LIB_NAME = require('./package.json').name;
export default [
{
input: `src/${LIB_NAME}.ts`,
output: [
{
file: `dist/es2015/${LIB_NAME}.js`,
format: 'esm',
sourcemap: true
}
],
plugins: [
typescript({
cacheRoot: '.rollupcache',
tsconfigOverride: {
compilerOptions: {
removeComments: true,
}
}
})
]
},
{
input: `src/${LIB_NAME}.ts`,
output: {
file: `dist/es2017/${LIB_NAME}.js`,
format: 'esm'
},
plugins: [
typescript({
cacheRoot: '.rollupcache',
tsconfigOverride: {
compilerOptions: {
target: 'es2017',
removeComments: true,
}
}
})
]
},
{
input: `src/${LIB_NAME}.ts`,
output: [
{ file: `dist/amd/${LIB_NAME}.js`, format: 'amd', id: 'aurelia-ui-virtualization', sourcemap: true },
{ file: `dist/commonjs/${LIB_NAME}.js`, format: 'cjs', sourcemap: true },
{ file: `dist/system/${LIB_NAME}.js`, format: 'system', sourcemap: true },
{ file: `dist/native-modules/${LIB_NAME}.js`, format: 'esm', sourcemap: true },
],
plugins: [
typescript({
cacheRoot: '.rollupcache',
tsconfigOverride: {
compilerOptions: {
target: 'es5',
removeComments: true,
}
}
})
]
}
].map(config => {
config.external = [
'aurelia-binding',
'aurelia-dependency-injection',
'aurelia-history',
'aurelia-pal',
'aurelia-templating',
'aurelia-templating-resources'
];
return config;
});