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

Fix pkg.browser mappings issue by specifying a value of false#183

Merged
lukastaegert merged 2 commits intorollup:masterfrom
allex:dev
Feb 22, 2019
Merged

Fix pkg.browser mappings issue by specifying a value of false#183
lukastaegert merged 2 commits intorollup:masterfrom
allex:dev

Conversation

@allex
Copy link
Copy Markdown
Contributor

@allex allex commented Oct 18, 2018

Fix pkg.browser with some maps specifying a value of false to ignore a module. (https://github.com/defunctzombie/package-browser-field-spec)

...
"browser": {
    "module-a": false,  // ---->>> map to empty.js
    "./server/only.js": "./shims/server-only.js"
}

@allex allex changed the title Fix pkg.browser mappings issue by specifying a value of false issue. Fix pkg.browser mappings issue by specifying a value of false Oct 18, 2018
allex added a commit to allex/rollup-plugin-node-resolve that referenced this pull request Oct 18, 2018
allex added a commit to allex/rollup-plugin-node-resolve that referenced this pull request Oct 19, 2018
@bterlson
Copy link
Copy Markdown
Contributor

@guybedford @TrySound @lukastaegert @keithamus anything I can do to help with this PR? I'm trying to migrate some projects to rollup and being able to ignore node built-ins that I know for sure won't be called in the browser (ala webpack) would be really nice.

In the meantime, I'm rolling my own shims with rollup-plugin-shim, but it's frustrating because I have to shim each export which I think this PR obviates. Let me know if there's a better workaround!

@lukastaegert
Copy link
Copy Markdown
Member

Will try to have a look tomorrow

@bterlson
Copy link
Copy Markdown
Contributor

@lukastaegert yay! I'm here all day (PST), let me know if I can help!

allex added a commit to allex/rollup-plugin-node-resolve that referenced this pull request Feb 20, 2019
Copy link
Copy Markdown
Member

@lukastaegert lukastaegert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good apart from the two remaining suggestions

@lukastaegert lukastaegert merged commit 9ce01d4 into rollup:master Feb 22, 2019
@lukastaegert
Copy link
Copy Markdown
Member

Released

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.

4 participants