forked from wangeditor-next/wangEditor-for-vue2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.example.config.js
39 lines (36 loc) · 957 Bytes
/
rollup.example.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
33
34
35
36
37
38
39
import path from 'path'
import htmlTemplate from 'rollup-plugin-generate-html-template'
import serve from 'rollup-plugin-serve'
import copy from 'rollup-plugin-copy'
import del from 'rollup-plugin-delete'
import devConfig from './build/config/dev'
import { merge } from 'lodash'
// 继续生成 rollup config
const name = 'WangEditorForVue'
const input = path.resolve(__dirname, './example', 'index.ts')
const file = 'dist-example/index.js'
const port = 8883
const config = {
input,
output: {
file,
format: 'umd',
name,
},
plugins: [
serve({
// open: true,
contentBase: ['dist-example'],
port,
onListening: function () {
console.log(`\nExample is running on http://localhost:${port}/\n`)
},
}),
htmlTemplate({
template: 'example/index.html',
target: 'dist-example/index.html',
}),
del({ targets: 'dist-example/*' }),
],
}
export default merge(devConfig, config)