-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathrollup.config.js
More file actions
38 lines (37 loc) · 876 Bytes
/
rollup.config.js
File metadata and controls
38 lines (37 loc) · 876 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
/*
* @Author: Mr.Mao
* @Date: 2021-08-05 10:28:49
* @LastEditTime: 2021-08-05 10:38:23
* @Description:
* @LastEditors: Mr.Mao
* @autograph: 任何一个傻子都能写出让电脑能懂的代码,而只有好的程序员可以写出让人能看懂的代码
*/
import { defineConfig } from "rollup"
import esbuild from 'rollup-plugin-esbuild'
import dts from 'rollup-plugin-dts'
const configs = []
configs.push(defineConfig({
input: 'libs/index.ts',
output: [
{
file: 'dist/index.cjs.js',
format: 'cjs',
},
{
file: 'dist/index.esm.js',
format: 'es',
}
],
plugins: [esbuild()],
external: ['@vue/composition-api'],
}))
configs.push(defineConfig({
input: 'libs/index.ts',
output: {
file: 'dist/index.d.ts',
format: 'es'
},
plugins: [dts()],
external: ['@vue/composition-api']
}))
export default configs