-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrollup.config.dev.js
More file actions
41 lines (40 loc) · 885 Bytes
/
rollup.config.dev.js
File metadata and controls
41 lines (40 loc) · 885 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
39
40
41
import typescript from 'rollup-plugin-typescript2'
import { nodeResolve } from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import postcss from 'rollup-plugin-postcss'
import copy from 'rollup-plugin-copy'
import serve from 'rollup-plugin-serve'
export default {
input: 'src/umd.ts', // 入口文件
output: {
file: 'dev/the-editor.js',
format: 'umd',
sourcemap: true,
name: 'TheEditor'
},
plugins: [
copy({
targets: [
{
src: 'index.html', dest: 'dev/'
}
]
}),
postcss({
extensions: ['.scss', '.css'],
use: ['sass'],
extract: true
}),
commonjs(),
nodeResolve(),
typescript({
tsconfigOverride: {
compilerOptions: {
module: 'ESNext'
}
},
useTsconfigDeclarationDir: true
}),
serve('dev')
]
}