Skip to content
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.

fix: add guard for options.browser with no pkg.browser field #129

Merged

Conversation

keithamus
Copy link
Contributor

This adds a fix for the problem described in #127 (comment)

@Rich-Harris Rich-Harris merged commit 6aeecbf into rollup:master Jan 10, 2018
@Rich-Harris
Copy link
Contributor

Thanks, released 3.0.2 👍

@keithamus keithamus deleted the fix-new-browser-resolve-refactor branch January 10, 2018 20:56
@Haroenv
Copy link

Haroenv commented Jan 10, 2018

Perfect!

@wKovacs64
Copy link

@keithamus Hmm, this broke my build. I get this as of 3.0.2:

[!] Error: Unexpected token
node_modules/axios/package.json (2:8)
1: {
2:   "name": "axios",
           ^
3:   "version": "0.17.1",
4:   "description": "Promise based HTTP client for the browser and node.js",

Not sure if it's related to how axios is using the browser field to replace a specific file or what. I can open a dedicated issue for tracking if you'd like.

@Haroenv
Copy link

Haroenv commented Jan 13, 2018

I opened #130 which I think has the same origin @wKovacs64

@wKovacs64
Copy link

@Haroenv Oh, cool, didn't realize that was the same thing. Thanks.

@feross
Copy link

feross commented Jan 15, 2018

Yes, this broke my build too. The "browser" field is being completely ignored.

@Haroenv
Copy link

Haroenv commented Jan 15, 2018

This pr introduced behaviour where only the main file is resolved, but all of the files in the browser field should be resolved as described in the map. I couldn't figure out how to make that change in this code

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants