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 850a86f commit 15c5182
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')

Check failure on line 18 in vite.config.ts

View workflow job for this annotation

GitHub Actions / NPM lint

'req.url' is possibly 'undefined'.
} 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`)

Check failure on line 20 in vite.config.ts

View workflow job for this annotation

GitHub Actions / NPM lint

'req.url' is possibly 'undefined'.
}
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 15c5182

Please sign in to comment.