-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
32 lines (31 loc) · 1.01 KB
/
rollup.config.js
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 replace from '@rollup/plugin-replace';
import commonjs from "@rollup/plugin-commonjs";
import babel from "@rollup/plugin-babel"
import resolve from 'rollup-plugin-node-resolve';
import json from '@rollup/plugin-json';
import { terser } from 'rollup-plugin-terser';
import { uglify } from "rollup-plugin-uglify";
export default {
input : ['src/index.js'],
plugins: [
replace({
preventAssignment: true,
delimiters: ['', ''],
'#!/usr/bin/env node': ''
}),
json(),
resolve(), //告诉 Rollup 如何查找外部模块
commonjs(), //用来将 CommonJS 转换成 ES2015 模块的,用在其他插件转换你的模块之前 - 这是为了防止其他插件的改变破坏 CommonJS 的检测
babel({
exclude : 'node_modules/**'
}),
uglify(),
terser(),
],
external : ['commander'],
output : {
file : "./dist/index.js",
format: "umd",
name : 'vite-plugin-vue-dynamic-path'
}
}