-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathrollup.config.mjs
More file actions
40 lines (39 loc) · 890 Bytes
/
Copy pathrollup.config.mjs
File metadata and controls
40 lines (39 loc) · 890 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
import terser from '@rollup/plugin-terser';
import typescript from '@rollup/plugin-typescript';
import dts from 'rollup-plugin-dts';
export default [
{
input: 'src/index.ts',
external: ['react', 'highlight.js'],
plugins: [
terser(),
typescript({
tsconfig: 'tsconfig.json',
declaration: true,
declarationDir: 'lib/types',
rootDir: 'src',
sourceMap: false,
}),
],
output: [
{
file: 'lib/index.js',
name: 'ReactHighlightSyntax',
format: 'cjs',
sourcemap: false,
},
{
file: 'lib/index.mjs',
name: 'ReactHighlightSyntax',
format: 'es',
sourcemap: false,
},
],
},
{
input: 'lib/types/index.d.ts',
external: ['glob', 'path'],
plugins: [dts()],
output: [{ file: 'lib/index.d.ts', format: 'es' }],
},
];