mirror of
https://github.com/mandiant/capa.git
synced 2025-12-12 07:40:38 -08:00
20 lines
597 B
JavaScript
20 lines
597 B
JavaScript
import { defineConfig } from "vite";
|
|
import vue from "@vitejs/plugin-vue";
|
|
import { viteSingleFile } from "vite-plugin-singlefile";
|
|
import { fileURLToPath, URL } from "node:url";
|
|
|
|
export default defineConfig(({ mode }) => {
|
|
const isBundle = mode === "bundle";
|
|
|
|
return {
|
|
base: "./",
|
|
plugins: isBundle ? [vue(), viteSingleFile()] : [vue()],
|
|
resolve: {
|
|
alias: {
|
|
"@": fileURLToPath(new URL("src", import.meta.url)),
|
|
"@testfiles": fileURLToPath(new URL("../../tests/data", import.meta.url))
|
|
}
|
|
}
|
|
};
|
|
});
|