-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.mjs
39 lines (37 loc) · 955 Bytes
/
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
import commonjs from "@rollup/plugin-commonjs";
import nodeResolve from "@rollup/plugin-node-resolve";
import resolve from "@rollup/plugin-node-resolve"
import typescript from "@rollup/plugin-typescript";
import babel from "@rollup/plugin-babel";
import replace from "@rollup/plugin-replace";
import json from "@rollup/plugin-json";
export default {
input: "src/app/index.tsx",
output: {
file: "build/bundle.js",
format: "iife"
},
plugins: [
resolve({
copyTo: 'dist/libs',
desDir: './libs'
}),
nodeResolve({
extensions: ['.ts', '.tsx', 'js', 'jsx'],
browser: true
}),
typescript(),
json(),
babel({
babelHelpers: "bundled",
presets: ['@babel/preset-react'],
extensions: ['.ts', '.tsx', 'js', 'jsx'],
}),
commonjs(),
replace({
preventAssignment: false,
transformMixedEsModules: true,
'process.env.NODE_ENV': '"development"'
})
],
};