2023-11-06 02:22:33 +00:00
|
|
|
import { defineConfig } from "vite";
|
|
|
|
import cssInjectedByJsPlugin from "vite-plugin-css-injected-by-js";
|
2023-10-02 03:23:22 +00:00
|
|
|
import { fileURLToPath } from "url";
|
|
|
|
import { paths } from "./build.js";
|
2023-10-07 23:24:57 +00:00
|
|
|
import vuePlugin from "@vitejs/plugin-vue";
|
2023-10-02 03:23:22 +00:00
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
base: paths.base,
|
|
|
|
//appType: "custom",
|
|
|
|
plugins: [
|
2023-10-07 23:24:57 +00:00
|
|
|
cssInjectedByJsPlugin(),
|
|
|
|
vuePlugin()
|
2023-10-02 03:23:22 +00:00
|
|
|
],
|
|
|
|
assetsInclude: [
|
|
|
|
"**/*.ejs"
|
|
|
|
],
|
|
|
|
build: {
|
|
|
|
manifest: true,
|
|
|
|
target: ["es2022", "chrome89", "edge89", "safari15", "firefox89", "opera75"],
|
|
|
|
rollupOptions: {
|
|
|
|
input: {
|
|
|
|
map: fileURLToPath(new URL('./src/map/map.ts', import.meta.url)),
|
|
|
|
//table: fileURLToPath(new URL('./src/table/table.ts', import.meta.url)),
|
|
|
|
//example: fileURLToPath(new URL('./src/example/example.html', import.meta.url)),
|
|
|
|
},
|
|
|
|
external: [
|
|
|
|
"jsdom" // Only actually imported in backend environment
|
|
|
|
]
|
|
|
|
},
|
|
|
|
sourcemap: true,
|
2023-10-30 00:14:54 +00:00
|
|
|
},
|
|
|
|
test: {
|
|
|
|
environment: 'happy-dom'
|
2023-10-02 03:23:22 +00:00
|
|
|
}
|
|
|
|
});
|