forked from gramps-project/gramps-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathweb-dev-server.config.mjs
More file actions
33 lines (31 loc) · 882 Bytes
/
web-dev-server.config.mjs
File metadata and controls
33 lines (31 loc) · 882 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
import {fromRollup} from '@web/dev-server-rollup'
import rollupReplace from '@rollup/plugin-replace'
import {esbuildPlugin} from '@web/dev-server-esbuild'
const replace = fromRollup(rollupReplace)
export default {
nodeResolve: {exportConditions: ['browser']},
middleware: [
async (ctx, next) => {
if (ctx.path.startsWith('/webawesome-styles/')) {
ctx.path = ctx.path.replace(
'/webawesome-styles/',
'/node_modules/@awesome.me/webawesome/dist/styles/'
)
}
await next()
},
],
plugins: [
esbuildPlugin({ts: true}),
replace({
include: [
'node_modules/@popperjs/**/*.js',
'node_modules/@popperjs/**/*.ts',
'node_modules/tippy.js/**/*.ts',
'node_modules/tippy.js/**/*.js'
],
preventAssignment: true,
'process.env.NODE_ENV': '"production"'
})
]
}