From af44ead9ce2ba31145ff0681a44b78cfcb3f119b Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Mon, 17 Jun 2024 13:39:50 +0200 Subject: [PATCH] refactor: Only build one CSS file for the app to prevent loading issues Signed-off-by: Ferdinand Thiessen [skip ci] --- lib/Listener/BeforeTemplateRenderedListener.php | 1 + tsconfig.json | 2 +- vite.config.js | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/Listener/BeforeTemplateRenderedListener.php b/lib/Listener/BeforeTemplateRenderedListener.php index 1050996dc..190364f2b 100644 --- a/lib/Listener/BeforeTemplateRenderedListener.php +++ b/lib/Listener/BeforeTemplateRenderedListener.php @@ -95,6 +95,7 @@ public function handle(Event $event): void { } } + Util::addStyle(Application::APP_ID, Application::APP_ID . '-style'); Util::addScript(Application::APP_ID, Application::APP_ID . '-about'); $this->initialState->provideInitialState( diff --git a/tsconfig.json b/tsconfig.json index d9ebc9f5b..37a84b488 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,6 @@ { "extends": "@vue/tsconfig", - "include": ["src/**/*.ts", "src/**/*.vue"], + "include": ["src/*.ts", "src/**/*.ts", "src/**/*.vue"], "compilerOptions": { "lib": ["DOM", "ESNext"] } diff --git a/vite.config.js b/vite.config.js index a83032162..08ae0b131 100644 --- a/vite.config.js +++ b/vite.config.js @@ -4,4 +4,11 @@ import { join } from 'node:path' export default createAppConfig({ activate: join(__dirname, 'src', 'first-run.js'), about: join(__dirname, 'src', 'app-menu.js'), +}, { + config: { + build: { + // Just one CSS files for now + cssCodeSplit: false, + }, + }, })