-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrollup.config.js
More file actions
29 lines (28 loc) · 846 Bytes
/
rollup.config.js
File metadata and controls
29 lines (28 loc) · 846 Bytes
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
import babel from '@rollup/plugin-babel';
import external from 'rollup-plugin-peer-deps-external';
import del from 'rollup-plugin-delete';
import pkg from './package.json';
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import { terser } from "rollup-plugin-terser"
import json from '@rollup/plugin-json';
// import { nodeResolve } from "@rollup/plugin-node-resolve";
export default {
input: pkg.source,
output: [
{ file: pkg.main, format: 'cjs' },
{ file: pkg.module, format: 'esm' }
],
plugins: [
resolve(),
external(),
babel({
exclude: 'node_modules/**'
}),
json(),
commonjs(),
terser(),
del({ targets: ['dist/*'] }),
],
external: Object.keys(pkg.peerDependencies || {}),
};