Skip to content

Possible loadAsFile inconsistencies #66

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

Closed
mattfysh opened this issue Jan 30, 2015 · 2 comments
Closed

Possible loadAsFile inconsistencies #66

mattfysh opened this issue Jan 30, 2015 · 2 comments

Comments

@mattfysh
Copy link

It seems that if resolving a path that matches the regexp
e.g. ./node_modules/jquery/jquery.min - then loadAsFile(String, Function) is called
however if the id takes format of "jquery/jquery.min", then loadAsFile(String, undefined, Function) is called

This results in opts.package being used only when the RegExp is matched. This has an upstream effect on browser-resolve and module-deps whereby if I use the first format, my transforms will apply inside of node_modules, but if I use the second, they don't... is this possibly a bug, or is there a reason behind it? Thanks!

@mattfysh
Copy link
Author

@jaredhanson any thoughts on this one? I had a look at the changeset and it looks like it was a conscious choice to send undefined as 2nd param if id does not match regexp.

@ljharb
Copy link
Member

ljharb commented Jun 17, 2018

I think this change was implemented here - which links to browserify/browser-resolve#56.

I'm not sure what's specifically actionable here, so I'm going to close it, but I'm more than happy to reopen it if there's something specific we should be doing.

@ljharb ljharb closed this as completed Jun 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants