Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #615 +/- ##
==========================================
- Coverage 78.62% 78.62% -0.01%
==========================================
Files 128 128
Lines 12461 12468 +7
Branches 902 902
==========================================
+ Hits 9798 9803 +5
- Misses 2658 2660 +2
Partials 5 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
| File | Base | Head | Diff |
|---|---|---|---|
orama-db.json |
8.03 MB | 8.03 MB | -1.78 KB (-0.02%) |
web Generator
| File | Base | Head | Diff |
|---|---|---|---|
styles.css |
128.14 KB | 128.21 KB | +67.00 B (+0.05%) |
892672a to
9a2532e
Compare
There was a problem hiding this comment.
Pull request overview
This PR reduces runtime/import-time failures on platforms that don’t support certain native bindings by deferring/avoiding problematic imports in the web generator pipeline.
Changes:
- Switch Lightning CSS usage in the web generator from
lightningcsstolightningcss-wasm. - Replace the static
rolldownimport with a lazy dynamic import so it isn’t loaded unless bundling runs. - Update dependency metadata (Dependabot + shrinkwrap) to reflect the new package.
Reviewed changes
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/generators/web/utils/processing.mjs | Uses lightningcss-wasm for final CSS minification. |
| src/generators/web/utils/css.mjs | Uses lightningcss-wasm for CSS modules bundling. |
| src/generators/web/utils/bundle.mjs | Lazily imports rolldown and resolves build at runtime. |
| package.json | Replaces lightningcss with lightningcss-wasm dependency. |
| npm-shrinkwrap.json | Lockfile updates for lightningcss-wasm and removal of root lightningcss. |
| .github/dependabot.yml | Updates the dependency group pattern to lightningcss-wasm. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
ovflowd
left a comment
There was a problem hiding this comment.
Wait, isn't the web generator already lazily imported? Why is it throwing error then?
|
@ovflowd We load all the generators on the main thread to extract the configuration options. They are dynamically loaded on threads |
Im fairly sure I changed the generators list so that the values only load when called. Why do we load all generators on main thread? We shouldn't. All we do is access the keys. |
|
We need to import the generator files on the main thread as a part of initializing configuration values. Feel free to check the code base, I’m certain of this behavior. It’s intentional, as we need to access more than just the named keys. |
|
Then let's close this PR, Ill change the generators structure so instead of the value being lazy, the actual impl being lazy, hold tight. |
|
Let’s leave this open, should we need to come back to this, but sure |
This prevents non-
webgenerators from throwing errors on machines that don't support the new generators.In the future, we will need a permanent solution (likely just not generating on these minority distros), but for now, this is a low-impact fix.