From 8219fa30e935fef2b0f4beab563ab7da188e9b44 Mon Sep 17 00:00:00 2001 From: Jonas Date: Wed, 11 Dec 2024 13:44:53 +0100 Subject: [PATCH] chore: Rename JS asset from `text-editors.mjs` to `text-editor.js` Use the same filename for source file and compiled asset. Signed-off-by: Jonas --- lib/Listeners/LoadEditorListener.php | 4 ++-- vite.config.ts | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/Listeners/LoadEditorListener.php b/lib/Listeners/LoadEditorListener.php index 9f4dd3365e0..e8c67063536 100644 --- a/lib/Listeners/LoadEditorListener.php +++ b/lib/Listeners/LoadEditorListener.php @@ -34,7 +34,7 @@ public function handle(Event $event): void { $this->eventDispatcher->dispatchTyped(new RenderReferenceEvent()); $this->initialStateProvider->provideState(); - Util::addScript('text', 'text-editors'); - Util::addStyle('text', 'text-editors'); + Util::addScript('text', 'text-editor'); + Util::addStyle('text', 'text-editor'); } } diff --git a/vite.config.ts b/vite.config.ts index 0fc7af93b00..1cb2d0b33b6 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -16,8 +16,6 @@ const rewriteMiddlewarePlugin = { if (m) { if (m[1] === 'text') { req.url = '/src/main.js' - } else if (m[1] === 'editors') { - req.url = '/src/editor.js' } else { req.url = `/src/${m[1]}.js` } @@ -32,7 +30,7 @@ const config = createAppConfig({ files: path.join(__dirname, 'src', 'files.js'), public: path.join(__dirname, 'src', 'public.js'), viewer: path.join(__dirname, 'src', 'viewer.js'), - editors: path.join(__dirname, 'src', 'editor.js'), + editor: path.join(__dirname, 'src', 'editor.js'), init: path.join(__dirname, 'src', 'init.js'), }, { createEmptyCSSEntryPoints: true,