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
@@ -13,6 +13,7 @@ docker/
|
|||||||
/node_modules/
|
/node_modules/
|
||||||
/public/build/
|
/public/build/
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
|
/yarn.lock
|
||||||
###< node / vite build ###
|
###< node / vite build ###
|
||||||
|
|
||||||
###> lexik/jwt-authentication-bundle ###
|
###> lexik/jwt-authentication-bundle ###
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
import SwaggerUI from 'swagger-ui';
|
|
||||||
import 'swagger-ui/dist/swagger-ui.css';
|
|
||||||
|
|
||||||
SwaggerUI({
|
|
||||||
url: '/_dev/specs.yaml',
|
|
||||||
dom_id: '#swag'
|
|
||||||
})
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
pentatrion_vite:
|
||||||
|
default_config: chill
|
||||||
|
configs:
|
||||||
|
# assets of the chill bundles
|
||||||
|
chill:
|
||||||
|
build_directory: build
|
||||||
|
|
||||||
|
when@prod:
|
||||||
|
pentatrion_vite:
|
||||||
|
cache: true
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
when@dev:
|
||||||
|
swagger_ui:
|
||||||
|
path: /_dev/swagger
|
||||||
|
controller: Chill\MainBundle\Controller\Dev\SwaggerController::index
|
||||||
|
|
||||||
|
swagger_specs:
|
||||||
|
path: /_dev/specs/{filename}
|
||||||
|
controller: Chill\MainBundle\Controller\Dev\SwaggerController::spec
|
||||||
|
requirements:
|
||||||
|
filename: '[a-zA-Z0-9_-]+\.yaml'
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
when@dev:
|
||||||
|
_pentatrion_vite:
|
||||||
|
prefix: /build
|
||||||
|
resource: "@PentatrionViteBundle/Resources/config/routing.yaml"
|
||||||
|
|
||||||
|
_profiler_vite:
|
||||||
|
path: /_profiler/vite
|
||||||
|
defaults:
|
||||||
|
_controller: Pentatrion\ViteBundle\Controller\ProfilerController::info
|
||||||
Generated
+14558
File diff suppressed because it is too large.
Load diff
+12
-11
@@ -1,20 +1,21 @@
|
|||||||
{
|
{
|
||||||
"workspaces": [
|
|
||||||
"vendor/chill-project/chill-bundles"
|
|
||||||
],
|
|
||||||
"private": true,
|
"private": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@chill-project/chill-bundles": "file:vendor/chill-project/chill-bundles"
|
||||||
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@symfony/ux-translator": "file:vendor/symfony/ux-translator/assets",
|
"@symfony/ux-translator": "file:vendor/symfony/ux-translator/assets",
|
||||||
"bootstrap": "5.2.3",
|
"@vitejs/plugin-vue": "^6.0.9",
|
||||||
"intl-messageformat": "^10.5.11"
|
"intl-messageformat": "^10.5.11",
|
||||||
|
"sass": "^1.89.0",
|
||||||
|
"typescript": "^5.6.3",
|
||||||
|
"vite": "^8.3.0",
|
||||||
|
"vite-plugin-symfony": "^8.2.4"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"specs-build": "yaml-merge vendor/chill-project/chill-bundles/src/Bundle/ChillMainBundle/chill.api.specs.yaml vendor/chill-project/chill-bundles/src/Bundle/ChillPersonBundle/chill.api.specs.yaml vendor/chill-project/chill-bundles/src/Bundle/ChillCalendarBundle/chill.api.specs.yaml vendor/chill-project/chill-bundles/src/Bundle/ChillThirdPartyBundle/chill.api.specs.yaml vendor/chill-project/chill-bundles/src/Bundle/ChillDocStoreBundle/chill.api.specs.yaml> templates/api/specs.yaml",
|
"dev": "vite",
|
||||||
"specs-validate": "swagger-cli validate templates/api/specs.yaml",
|
"build": "vite build",
|
||||||
"specs-create-dir": "mkdir -p templates/api",
|
"prod": "npm run build"
|
||||||
"specs": "yarn run specs-create-dir && yarn run specs-build && yarn run specs-validate",
|
|
||||||
"dev": "yarn run encore dev",
|
|
||||||
"prod": "yarn run encore production"
|
|
||||||
},
|
},
|
||||||
"version": "0.0.0"
|
"version": "0.0.0"
|
||||||
}
|
}
|
||||||
+7
-12
@@ -1,19 +1,14 @@
|
|||||||
{
|
{
|
||||||
"extends": "./vendor/chill-project/chill-bundles/ts-config-base.json",
|
"extends": "./vendor/chill-project/chill-bundles/ts-config-base.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"sourceMap": true
|
"sourceMap": true,
|
||||||
|
"baseUrl": "."
|
||||||
},
|
},
|
||||||
"includes": [
|
"include": [
|
||||||
"./vendor/chill-project/chill-bundles/src/Bundle/**/*.ts",
|
"./assets/**/*.ts",
|
||||||
"./vendor/chill-project/chill-bundles/src/Bundle/**/*.vue",
|
"./assets/**/*.vue",
|
||||||
"./src/**/*.ts",
|
"./src/**/*.ts",
|
||||||
"./src/**/*.vue"
|
"./src/**/*.vue",
|
||||||
],
|
"./vite.config.ts"
|
||||||
"exclude": [
|
|
||||||
"./vendor/chill-project/chill-bundles/tests/*",
|
|
||||||
"./vendor/chill-project/chill-bundles/docs/*",
|
|
||||||
"./vendor/chill-project/chill-bundles/assets/translator.ts",
|
|
||||||
"./vendor/chill-project/chill-bundles/var/*.*"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -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