You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi their!
Hope you are doing well! At start, thanks for your work!
It will be nice to be able to specify the resolver options supported by the lightningcss compiler but that seems to be not passed and supported on the vite side...
What is the usecase for accepting a resolver option? Vite has its own internal resolver too and it should use that. Similar to how postcss-import and CSS preprocessors like SCSS, Stylus, all use Vite's resolver only.
The idea is to allow use of globs into the css @import like so:
@import'./components/**/*.css';
For now it's not working at all.
I checked with the lightningcss repo contributors parcel-bundler/lightningcss#735 but they think it's on the vite side.
My guess is that the simpliest way to allow devs to support custom imports inside the lighningcss module is to pass the resolver options down to lighntningcss from the lighningcss options object like in my example above.
Unless you have another idea that I will be happy to implement and share :)
In that case, it seems like a bug (or technically a feature request) to me to make import globs work with lightningcss. There's also a corresponding postcss feature request: #12336. If we can get this working, then I don't think we have to expose the resolver option.
Description
Hi their!
Hope you are doing well! At start, thanks for your work!
It will be nice to be able to specify the
resolver
options supported by the lightningcss compiler but that seems to be not passed and supported on the vite side...vite/packages/vite/src/types/lightningcss.d.ts
Line 13 in 6a7dde5
Suggested solution
Add the
resolver
option in theLightningCSSOptions
type as well as passing it to the lightningcss compiler.Alternative
No response
Additional context
Example of use:
Validations
The text was updated successfully, but these errors were encountered: