2021-12-28 14:02:29 +00:00
|
|
|
import { fromRollup } from '@web/dev-server-rollup'
|
2022-11-27 22:01:27 +00:00
|
|
|
import rollupBabel from '@rollup/plugin-babel'
|
2021-12-28 14:02:29 +00:00
|
|
|
import rollupHtml from 'rollup-plugin-html'
|
2021-05-09 17:29:45 +00:00
|
|
|
|
2021-12-28 14:02:29 +00:00
|
|
|
const html = fromRollup(rollupHtml)
|
2022-11-27 22:01:27 +00:00
|
|
|
const babel = fromRollup(rollupBabel)
|
2021-05-09 17:29:45 +00:00
|
|
|
|
|
|
|
export default {
|
2021-12-03 22:13:20 +00:00
|
|
|
mimeTypes: {
|
|
|
|
// serve imported html files as js
|
|
|
|
'src/editor/panels/*.html': 'js',
|
|
|
|
'src/editor/templates/*.html': 'js',
|
|
|
|
'src/editor/dialogs/*.html': 'js',
|
2022-11-27 22:01:27 +00:00
|
|
|
'src/editor/extensions/*/*.html': 'js'
|
2021-12-03 22:13:20 +00:00
|
|
|
},
|
2021-05-09 17:29:45 +00:00
|
|
|
plugins: [
|
2021-12-28 14:02:29 +00:00
|
|
|
html({
|
|
|
|
include: [
|
|
|
|
'src/editor/panels/*.html',
|
|
|
|
'src/editor/templates/*.html',
|
|
|
|
'src/editor/dialogs/*.html',
|
2022-11-27 22:01:27 +00:00
|
|
|
'src/editor/extensions/*/*.html'
|
2021-12-28 14:02:29 +00:00
|
|
|
]
|
|
|
|
}),
|
2022-11-27 22:01:27 +00:00
|
|
|
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/**'
|
|
|
|
]
|
|
|
|
}]
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
2021-05-09 17:29:45 +00:00
|
|
|
})
|
|
|
|
]
|
2021-12-28 14:02:29 +00:00
|
|
|
}
|