-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.js
More file actions
42 lines (38 loc) · 795 Bytes
/
Copy pathrollup.config.js
File metadata and controls
42 lines (38 loc) · 795 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
30
31
32
33
34
35
36
37
38
39
40
41
42
/* eslint-disable import/no-anonymous-default-export */
import typescript from 'rollup-plugin-typescript2';
import pkg from './package.json';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const extensions = ['.js', '.jsx', '.ts', '.tsx'];
const input = 'src/index.ts';
const external = [
...Object.keys(pkg.dependencies || {}),
...Object.keys(pkg.peerDependencies || {}),
];
const cssExportMap = {};
const plugins = [
typescript({
typescript: require('typescript'),
}),
];
export default [
{
input,
output: {
file: pkg.module,
format: 'esm',
sourcemap: true,
},
plugins,
external,
},
{
input,
output: {
file: pkg.main,
format: 'cjs',
sourcemap: true,
},
plugins,
external,
},
];