-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.ts
38 lines (36 loc) · 1.02 KB
/
rollup.config.ts
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
import {defineConfig} from 'rollup';
import swc from '@rollup/plugin-swc';
import terser from '@rollup/plugin-terser';
import buble from '@rollup/plugin-buble';
import {dts} from "rollup-plugin-dts";
import {resolve, dirname} from 'node:path'
import {fileURLToPath} from "node:url";
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
export default defineConfig([
{
input: resolve(__dirname, './src/index.ts'),
output: [
{
file: 'dist/es/index.esm.js',
format: 'esm',
},
{
file: 'dist/lib/index.umd.js',
format: 'umd',
name: 'DzStorage'
},
],
plugins: [swc(), buble({exclude: 'node_modules/**'}), terser()]
},
{
input: resolve(__dirname, './src/index.ts'),
plugins: [dts()],
output: [
{
file: 'dist/index.d.ts',
format: 'esm',
},
]
}
])