facilmap/frontend/vite.config.ts

42 wiersze
1.0 KiB
TypeScript
Czysty Zwykły widok Historia

/// <reference types="vitest" />
2023-11-06 02:22:33 +00:00
import { defineConfig } from "vite";
2023-10-02 03:23:22 +00:00
import { fileURLToPath } from "url";
import { paths } from "./build";
2023-10-07 23:24:57 +00:00
import vuePlugin from "@vitejs/plugin-vue";
import tsconfigPaths from "vite-tsconfig-paths";
import iconsPlugin from "facilmap-leaflet/rollup-icons";
import definePlugin from "./vite-define";
2023-10-02 03:23:22 +00:00
export default defineConfig({
base: paths.base,
plugins: [
vuePlugin(),
tsconfigPaths({ loose: true }),
iconsPlugin(),
definePlugin()
2023-10-02 03:23:22 +00:00
],
assetsInclude: [
"**/*.ejs"
],
build: {
outDir: "dist/app",
2023-10-02 03:23:22 +00:00
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)),
2023-10-02 03:23:22 +00:00
},
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
}
});