How to exclude node_modules from compilation?
#557
Replies: 1 comment
-
|
Hi @suhdonghwi , I don't think this is quite correct behavior. As far as I know, the For better debugging, you can log a list of all transpiled files in the console by defining the If you have any ideas on how to solve your problem and improve the plugin, I'm open to pull requests. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
First of all, thank you for this very useful plugin - it has been a great help.
I’m currently using
@stylexswc/nextjs-plugin. I noticed that when using the Next.js plugin, it ends up compiling every.js(x)file undernode_modulesas well.When using
@stylex/babel-plugin, it’s possible to pass anexcludeoption through webpack rules to avoid this(Example). With this plugin, there isn’t a way to do that, because it doesn't expose a webpack plugin directly; it provides a config transformer that manipulates the webpack configuration.Is there a way to exclude dependencies in
node_modulesfrom being compiled? If not, I'd be happy to contribute - could you share any guidance on how you'd prefer this to be implemented, or what direction would make sense for the project?Thanks!
Beta Was this translation helpful? Give feedback.
All reactions