Repository navigation
chore: do not inject css and build pure esm - #124
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #124 +/- ##
=======================================
Coverage 92.82% 92.82%
=======================================
Files 47 47
Lines 4069 4069
Branches 813 813
=======================================
Hits 3777 3777
Misses 273 273
Partials 19 19 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
skjnldsv
approved these changes
Oct 6, 2026
skjnldsv
left a comment
Contributor
There was a problem hiding this comment.
Ok then! I remember there was a reason I wanted the old injected css, but I don't recall anymore 🤔
susnux
marked this pull request as ready for review
October 7, 2026 09:20
all other libraries also already switched to esm only, so as this library also has some of them as a dependency an app does not work if they cannot bundle esm. Meaning there is no reason to not also go esm only and drop additional complexity of having a second cjs bundle. Moreover the bundled CSS might be a good case for libraries apps that cannot handle CSS imports, but if your app uses nextcloud-vue it already has to handle that. More important injecting CSS will make the app always include the viewer CSS within their JS bundles which has a performance impact. Especially when the app opts for split CSS and JS to reduce browsers JS parsing time. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Contributor
|
But that does mean apps needs to manually import the lib css ? @susnux |
Contributor
Author
No its the same as with nextcloud-vue. Its injected by apps where needed - or extracted if desired. |
This was referenced Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
all other libraries also already switched to esm only, so as this library also has some of them as a dependency an app does not work if they cannot bundle esm. Meaning there is no reason to not also go esm only and drop additional complexity of having a second cjs bundle.
Moreover the bundled CSS might be a good case for libraries apps that cannot handle CSS imports, but if your app uses nextcloud-vue it already has to handle that.
More important injecting CSS will make the app always include the viewer CSS within their JS bundles which has a performance impact. Especially when the app opts for split CSS and JS to reduce browsers JS parsing time.
🤖 AI (if applicable)
- [ ] The content of this PR was partly or fully generated using AI