-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Support config.preprocessorIgnorePatterns. #99
Conversation
This is useful for not processing the contents of e.g. node_modules.
Could you just do this in your preprocessor function? This is what I've recommended to everyone else when they ask how to skip processing of certain files. I also prefer that to a config option because it gives you full control over deciding how to short-circuit preprocessing without polluting the config API and/or asserting that regex is the only way. It also keeps the solution to the problem in the "one way to do it" zone. |
One benefit of doing it here is that the paths to be ignored get normalized in the same way as all the other paths. But this is definitely not the only way to do it. |
Well, I guess this seems to be a question that pops up a lot (and it actually doesn't hurt that much), so I won't fight it. |
if (config.scriptPreprocessor) { | ||
if (config.scriptPreprocessor && | ||
!config.preprocessorIgnorePatterns.some(function(pattern) { | ||
return filePath.indexOf(pattern) >= 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be a regexp test, not an indexOf search?
Any updates here? I'm happy to take this, but I think we just need to switch it to a regexp match instead of an indexOf |
Merged in #303 |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This is useful for not processing the contents of e.g. node_modules.