-
Notifications
You must be signed in to change notification settings - Fork 146
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
aliasMapping slow performance #127
Comments
This looks interesting for the v2 refactor. @bclinkbeard, would the aliasify approach here still work with your original use case for aliasMappings? |
I can't even get
The problem with this solution is that when using watch it will not update the mappings when files are added and/or removed. I guess the method has to be run again when this happens. See my answer to this question on Stackoverflow for more details. |
aliasMappings are being dropped in v2 in favor of a transform/plugin approach. |
I experienced slow performance when using aliasMappings on a directory with many js files, e.g.
The slow performance stems from browserify
require
ing every matched file, even if the matched file doesn't end up beingrequire
d.A better solution may be to take aliasify's approach and rewrite the
require
s to use the correct relative path. This way, matched files don't have to be parsed unnecessarily. I haven't tested it, but I think doing so will also solve #123.Here's an example of using aliasify with grunt-browserify to match aliasMapping's behavior:
The text was updated successfully, but these errors were encountered: