-
Notifications
You must be signed in to change notification settings - Fork 244
Description
Would it be possible to add custom import resolvers for the synchronous bundle() API?
Background:
I have created an ESLint Plugin that auto-fixes tailwindcss classes with the goal to make them more readable. Now I want to support tailwindcss 4 and its css based configuration.
ESLint does not support async rules, so I need a way to load the css config synchronously. Since tailwindcss 4 will also shift to lightningcss, I would also like to use lightningcss for that.
Based on the tailwindcss 4 announcement blog post, the import of the tailwindcss utilities will look like this:
@import "tailwindcss";The import specifier tailwindcss cannot be resolved directly because it is not located in the same directory as the user config. Therefore, I need a way to implement the node module resolution algorithm.
While the asynchronous bundleAsync() function supports this via the resolver property, the synchronous bundle() function currently lacks this capability.