Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a feature to resolve dependencies for Bundle API #911

Open
fz6m opened this issue Feb 7, 2025 · 0 comments
Open

Add a feature to resolve dependencies for Bundle API #911

fz6m opened this issue Feb 7, 2025 · 0 comments

Comments

@fz6m
Copy link

fz6m commented Feb 7, 2025

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 , fz6m/lightningcss-loader#8 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant