-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
web-dev-server.config.mjs
48 lines (46 loc) · 1.18 KB
/
web-dev-server.config.mjs
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
42
43
44
45
46
47
48
import { fromRollup } from '@web/dev-server-rollup'
import rollupBabel from '@rollup/plugin-babel'
import rollupHtml from 'rollup-plugin-html'
const html = fromRollup(rollupHtml)
const babel = fromRollup(rollupBabel)
export default {
mimeTypes: {
// serve imported html files as js
'src/editor/panels/*.html': 'js',
'src/editor/templates/*.html': 'js',
'src/editor/dialogs/*.html': 'js',
'src/editor/extensions/*/*.html': 'js'
},
plugins: [
html({
include: [
'src/editor/panels/*.html',
'src/editor/templates/*.html',
'src/editor/dialogs/*.html',
'src/editor/extensions/*/*.html'
]
}),
babel({
babelHelpers: 'bundled',
env: {
test: {
compact: false,
plugins: [
['istanbul', {
exclude: [
'editor/jquery.min.js',
'editor/jgraduate/**',
'editor/react-extensions/react-test'
],
include: [
'src/**',
'packages/svgcanvas/core/**',
'packages/svgcanvas/common/**'
]
}]
]
}
}
})
]
}