-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrollup.config.js
66 lines (64 loc) · 1.36 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
import babel from 'rollup-plugin-babel';
import { terser } from 'rollup-plugin-terser';
import sourcemaps from 'rollup-plugin-sourcemaps';
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import json from 'rollup-plugin-json';
const plugins = [
sourcemaps(),
json(),
resolve(),
commonjs(),
babel({
exclude: 'node_modules/**', // only transpile our source code
presets: [
"@babel/preset-env"
]
}),
terser({
keep_fnames: true
})
];
export default [
{
input: './src/livingapi.js',
output: [
{
file: './dist/umd/livingapi.js',
format: 'umd',
name: 'la',
sourcemap: true,
globals: {"@livinglogic/ul4": "ul4"}
},
{
file: './dist/esm-node/livingapi.js',
format: 'esm',
name: 'la',
sourcemap: true,
globals: {"@livinglogic/ul4": "ul4"}
},
{
file: './dist/esm-static/livingapi.js',
format: 'esm',
name: 'la',
sourcemap: true,
globals: {"@livinglogic/ul4": "ul4"},
paths: {
"@livinglogic/ul4": '/static/ul4/1.16.1/dist/esm/ul4.js'
}
},
{
file: './dist/esm-npm/livingapi.js',
format: 'esm',
name: 'la',
sourcemap: true,
globals: {"@livinglogic/ul4": "ul4"},
paths: {
"@livinglogic/ul4": '/npm/@livinglogic/[email protected]/dist/esm/ul4.js'
}
}
],
plugins: plugins,
external: ["@livinglogic/ul4"],
}
];