Files
chill-base-app-v3/vite.config.ts
T
2026-11-23 15:22:22 +01:00

32 lines
1.0 KiB
TypeScript

import { fileURLToPath, URL } from "node:url";
import { chillVitePreset } from "@chill-project/chill-bundles/vite";
import { defineConfig, mergeConfig } from "vite";
const r = (value: string): string =>
fileURLToPath(new URL(value, import.meta.url));
export default mergeConfig(
chillVitePreset({
// Passed explicitly: this config is ESM, and the preset's default relies on
// `__dirname` being available where it is bundled.
packageRoot: r("vendor/chill-project/chill-bundles"),
outputPath: "public/build",
publicPath: "/build/",
translationsPath: "var/translations",
}),
defineConfig({
resolve: {
// Chill's assets resolve their imports from Chill's own node_modules; keep
// one copy of the shared runtime rather than one per resolution root.
dedupe: [
"vue",
"pinia",
"vue-i18n",
"intl-messageformat",
"@symfony/ux-translator",
],
},
// this application has no entries of its own: only Chill's are built
}),
);