-
-
Notifications
You must be signed in to change notification settings - Fork 161
Do not throw errors when transforming excluded files #209
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
Comments
I pushed #215 for discussion if the approach of applying the |
hi @gajus - I don't mean to bother but wanted to check if something like #215 or a different implementation to a similar effect would be valuable to the project. As I need something like this I could invest some time either in refinement or working out a different implementation (hints or ideas appreciated). If not it's not a big deal, but it would be great to know as we need to base some decisions on it. |
The PR says it is WIP. If it is ready to merge, I am happy to merge it. |
Sounds great - the commit in the PR is currently marked as a feature release - if you are fine with that I will remove the WIP so that it can be merged. Otherwise I can include a BREAKING info or downgrade it to a fix release. I am not exactly sure about the scope as the original behavior is changed in the following way, which can also be seen as a breaking change.
|
I think the proposed behaviour is a sane default behaviour. I doubt it would break anything, but seeing this is a change to the way the current logic works, I will release it as a breaking change. Thank you. |
🎉 This issue has been resolved in version 5.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Thanks for your work on both of the great react-css-modules packages. I want to clarify if a behavior that we experience is expected or open to modification (or of course to be solved by other means).
I am excluding node_modules via the exclude option, which is respected in
ImportDeclaration(...)
, but not inJSXElement(...)
. The latter will eventually make assertions on excluded files (in our case throwing an error if it finds a styleName prop but no supported imports).Use case:
This affects us as we are maintaining a non-bundled internal component library that still uses the
react-css-modules
HOC (as well as a deprecated CSS preprocessor without a postcss syntax) and cannot be immediately refactored to the babel plugin. For the apps that make use of our internal dependency however we want to start using the babel plugin while gradually migrating the other parts over time.As mentioned above I would like to clarify if opting out in the JSXElement transform if the component's path matches the exclude setting makes sense in your opinion.
The text was updated successfully, but these errors were encountered: