-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathrollup.config.js
36 lines (35 loc) · 1 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
import { babel } from '@rollup/plugin-babel';
import external from 'rollup-plugin-peer-deps-external';
import commonjs from "@rollup/plugin-commonjs";
import typescript from "@rollup/plugin-typescript";
import scss from "rollup-plugin-scss";
import svg from "rollup-plugin-svg";
import { nodeResolve } from '@rollup/plugin-node-resolve';
import terser from '@rollup/plugin-terser';
export default [
{
input: 'component/index.ts',
external: [/node_module/, "react", "react-dom"],
output: [
{
file: 'dist/index.js',
format: 'es',
}
],
plugins: [
nodeResolve(),
external(),
babel({
exclude: 'node_modules/**',
presets: ['@babel/preset-react']
}),
typescript({ tsconfig: './tsconfig.json' }),
commonjs(),
scss({
insert: true
}),
svg(),
terser(),
],
}
]