Replace Webpack Encore by Vite
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
69cd19b932
commit
3926b26ae7
10 files changed
+14639
-31
No files matched your search
@@ -0,0 +1,31 @@
|
||||
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
|
||||
}),
|
||||
);
|
||||
Reference in new issue
Block a user