mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-06-06 08:42:35 +00:00
37 lines
969 B
TypeScript
37 lines
969 B
TypeScript
import { fileURLToPath, URL } from "node:url";
|
|
|
|
import { defineConfig } from "vite";
|
|
import vue from "@vitejs/plugin-vue";
|
|
import vueDevTools from "vite-plugin-vue-devtools";
|
|
import headerTransformationPlugin from "./build/HeaderTransformationPlugin";
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
build: {
|
|
emptyOutDir: true,
|
|
rollupOptions: {
|
|
output: {
|
|
assetFileNames: "[name][extname]",
|
|
entryFileNames: "[name].js",
|
|
chunkFileNames: "[name].js",
|
|
},
|
|
},
|
|
},
|
|
publicDir: fileURLToPath(new URL("./public", import.meta.url)),
|
|
plugins: [
|
|
vue(),
|
|
vueDevTools(),
|
|
headerTransformationPlugin({
|
|
outputPath: fileURLToPath(
|
|
new URL("../../build/src/ModMan/Web/ViteAssets.h", import.meta.url),
|
|
),
|
|
}),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
|
"@style": fileURLToPath(new URL("./src/style", import.meta.url)),
|
|
},
|
|
},
|
|
});
|