From 1ba2f4b9f393d3a3e5bd8cb291a79f0095e64ded 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 3be3003a840..7ea2d237d25 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -16,8 +16,6 @@ const rewriteMiddlewarePlugin = { if (m) { if (m[1] === 'text') { req.url = req.url?.replace(/\/js\/text-.*.mjs/, '/src/main.js') - } else if (m[1] === 'editors') { - req.url = req.url?.replace(/\/js\/text-.*.mjs/, '/src/editors.js') } else { req.url = req.url?.replace(/\/js\/text-.*.mjs/, `/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,