Closed justinbmeyer closed 9 years ago
@justinbmeyer This is all that is necessary to make direct require work and be able to shim via browser field in the nested modules?
Once you make the style changes, please squash into a single commit and reference the original discussion as you have. Great job on following this through!
@defunctzombie Yes, it seems like this is all that is needed as most of the hard work is now being done in node-resolve. I tested this against the workflow in CanJS (where CanJS has everything in dist/cjs
) that uses browserify and it worked right.
I will hopefully get the pull request cleaned up for tomorrow. Thanks!
Updated. Thanks!
published in v1.7.0
Thanks!
Now this seems to break browserify for me when I resolve files that are not .js
files. I'm using custom transforms to precompile hogan templates which stopped working. If I manually downgrade browser-resolve
to v1.6 it works fine again. But v1.7 is picked up by the current browserify release.
@mantoni Can you add a breaking test? Or give a small breaking example. What error do you get? I can get in a patch asap.
@justinbmeyer Thanks. Had to run away. Will try and isolate tomorrow.
Narrowed it down to this: https://github.com/substack/node-resolve/issues/69
Please consider nailing the dependency to resolve@1.0.0
for the time being.
For #51, this uses the 1.1.0 node-resolve to make deep module references mappable.
It works by adding a pathFilter that checks
browser
for a matching key and returns that value. It handles if the user does or does not end the map with.js
.It includes a test.
Thanks!