parcel-bundler / parcel-bundler/lightningcss
Use lightningCSS in browser shows error : failed to load resource `fs`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7.7k
- Forks
- 302
- PR merge metrics
- No merged PRs in 30d
Description
Use code from tutorial here
https://lightningcss.dev/docs.html#from-deno-or-in-browser
Shows error since it's try to load module which doesn't exist in browser environment
https://cdn.jsdelivr.net/npm/fs/+esm
Remove fs when import in browser could help ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the browser example in the lightningcss.dev tutorial and reproduce the failure shown in the issue. Inspect how the example imports its modules and verify the generated browser request for fs. Done means the documented browser example runs without attempting to load the unavailable fs resource.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100