Skip to content

Commit

Permalink
chore: Rename JS asset from text-editors.mjs to text-editor.js
Browse files Browse the repository at this point in the history
Use the same filename for source file and compiled asset.

Signed-off-by: Jonas <[email protected]>
  • Loading branch information
mejo- committed Dec 16, 2024
1 parent 5fe8c9e commit 1ba2f4b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/Listeners/LoadEditorListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}
4 changes: 1 addition & 3 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
}
Expand All @@ -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,
Expand Down

0 comments on commit 1ba2f4b

Please sign in to comment.