browserify / browser-resolve

resolve function which support the browser field in package.json
MIT License
102 stars 70 forks source link

feature: resolve main reference to other modules #84

Open pemrouz opened 7 years ago

pemrouz commented 7 years ago

Related: https://github.com/defunctzombie/node-browser-resolve/issues/83

Notes:

defunctzombie commented 7 years ago

@substack @sokra @Rich-Harris for additional review

pemrouz commented 7 years ago

bumping.. is there anything else required before we can land this?

pemrouz commented 7 years ago

@defunctzombie ..?

dy commented 5 years ago

@defunctzombie @sokra @Rich-Harris ping

goto-bus-stop commented 5 years ago

This does mean that there are a number modules that specify "browser": "browser.js" which would be invalid.

i don't have numbers on this but i've definitely seen it in the wild so support for that should not be dropped.

it looks like "browser": "barename" did not previously resolve to ./barename.js so that change should be safe.

goto-bus-stop commented 5 years ago

@pemrouz if you're still interested in working on this i can review later this week. no guarantees that defunctzombie will have time in the near future to do merges/releases ofc :)

i don't think webpack uses browser-resolve these days, unsure about rollup. it'd be good to check if webpack's enhanced-resolve already supports this too.