-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.mjs
32 lines (31 loc) · 911 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
import commonjs from '@rollup/plugin-commonjs';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import typescript from '@rollup/plugin-typescript';
import { dts } from "rollup-plugin-dts";
import del from 'rollup-plugin-delete';
export default [
{
input: 'src/index.ts',
external: ['kuromoji'],
plugins: [
del({ targets: 'dist/*' }),
commonjs(),
nodeResolve(),
typescript() // so Rollup can convert TypeScript to JavaScript
],
output: [
{
file: 'dist/index.bundle.js',
sourcemap: true,
},
]
},
{
input: "dist/index.d.ts",
output: [{ file: "dist/index.bundle.d.ts", format: "es" }],
plugins: [
dts(),
del({ hook: "buildEnd", targets: ['dist/*.d.ts', 'dist/internal'] })
]
}
];