parcel-bundler / parcel-bundler/lightningcss
Add a feature to resolve dependencies for Bundle API
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7.7k
- Forks
- 302
- PR merge metrics
- No merged PRs in 30d
Description
When using the bundle API, we may import CSS from third-party dependencies with @import.
e.g.
// style.css
@import "./common.css";
@import "bootstrap/dist/css/bootstrap.min.css"
// ...
Avoid the overhead of passing functions to Rust, we can add a parsing dependency entry point configuration (maybe projectRoot or new config ).
An example of parse the path:
const resolve = require("enhanced-resolve");
resolve(projectRoot, "bootstrap/dist/css/bootstrap.min.css"
( we can use libraries like parcel-resolver or rspack-resolver )
Related to #747 , https://github.com/fz6m/lightningcss-loader/issues/8#issuecomment-2643318025
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 by locating the Bundle API entry point and reviewing how the proposed projectRoot or parsing dependency entry-point configuration would reach CSS @import handling. Compare the suggested enhanced-resolve, parcel-resolver, and rspack-resolver approaches; done means third-party dependency imports such as bootstrap/dist/css/bootstrap.min.css resolve through the Bundle API without passing functions to Rust.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, rust, typescript
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100