warpgate/warpgate-web/vite.config.ts

34 lines
916 B
TypeScript
Raw Normal View History

2022-04-11 04:58:58 +08:00
import { defineConfig } from 'vite'
import { svelte } from '@sveltejs/vite-plugin-svelte'
import tsconfigPaths from 'vite-tsconfig-paths'
2022-11-12 03:31:08 +08:00
import { checker } from 'vite-plugin-checker'
2022-04-11 04:58:58 +08:00
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
svelte(),
tsconfigPaths(),
2022-11-12 03:31:08 +08:00
checker({ typescript: true }),
2022-04-11 04:58:58 +08:00
],
2022-06-27 02:50:04 +08:00
base: '/@warpgate',
2022-04-11 04:58:58 +08:00
build: {
sourcemap: true,
2022-06-27 02:50:04 +08:00
manifest: true,
2022-05-30 18:55:09 +08:00
commonjsOptions: {
include: [
2022-06-27 02:50:04 +08:00
'src/gateway/lib/api-client/dist/*.js',
'src/admin/lib/api-client/dist/*.js',
2022-05-30 18:55:09 +08:00
'**/*.js',
],
transformMixedEsModules: true,
},
2022-06-27 02:50:04 +08:00
rollupOptions: {
input: {
admin: 'src/admin/index.html',
gateway: 'src/gateway/index.html',
embed: 'src/embed/index.ts',
},
},
2022-04-11 04:58:58 +08:00
},
})