-
Notifications
You must be signed in to change notification settings - Fork 17
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 an option to transform specific libraries inside node_modules #124
Comments
@efoken updating |
No, because you are checking if the path contains EDIT: I changed Vite plugin and changed that lines to: if (
(url.includes('node_modules') &&
!transformLibraries.some((libName: string) => url.includes(libName))) ||
!filter(id) ||
id in cssLookup
) {
return;
} |
@efoken good point, I see. We need to allow transforming of So, I would start with |
@layershifter of course, boolean would be an option, just to bypass the node_modules filter. But maybe array is also a good idea, because then you can only allow specific modules to be transformed – I mean performance-wise it's better, no? |
@efoken my idea is that once we exclude a condition for |
@layershifter you're right, good idea 👍 |
Describe the feature
I am working on a library leveraging WyW, and also have a Design System monorepo set up which uses that library. While working with Design System libraries, it's often the case that you want to transform those, also when installed as dependencies.
Therefore it would be nice to have an options like
transformLibraries: ['your-design-lib']
that can be passed to WyW plugins.Possible implementations
Would transform the
your-design-lib
package inside node_modules.I already have implemented this by copying the whole Vite plugin, so I can contribute if you like.
The text was updated successfully, but these errors were encountered: