-
Notifications
You must be signed in to change notification settings - Fork 59
/
rollup.config.mjs
45 lines (44 loc) · 1.08 KB
/
rollup.config.mjs
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
import path from 'path';
import typescript from '@rollup/plugin-typescript';
import postcss from 'rollup-plugin-postcss';
export default [
{
input: './src/ts/index.ts',
output: {
format: 'umd',
name: 'Snowflakes',
file: './dist/snowflakes.js'
},
plugins: [typescript({ tsconfig: './tsconfig.lib.umd.json' })]
},
{
input: './src/ts/index.auto.ts',
output: {
format: 'iife',
file: './dist/snowflakes.auto.js'
},
plugins: [typescript({ tsconfig: './tsconfig.auto.json' })]
},
{
input: './src/ts/index.ts',
output: {
format: 'es',
file: './dist/snowflakes.esm.js'
},
plugins: [typescript({ tsconfig: './tsconfig.lib.esm.json' })]
},
{
input: './examples/constructor/src/index.ts',
output: {
format: 'iife',
file: './examples/constructor/dist/index.js'
},
plugins: [
typescript({ tsconfig: './tsconfig.constructor.json' }),
postcss({
config: true,
extract: path.resolve('./examples/constructor/dist/index.css')
}),
]
}
];