Skip to content
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

Fix the resolve options for a browser target #1

Merged
merged 1 commit into from
Jul 2, 2018
Merged

Conversation

homer0
Copy link
Owner

@homer0 homer0 commented Jul 2, 2018

What does this PR do?

I added two extra settings for the resolve plugin:

  • browser: Set to true when the target is for browser. Allows the plugin to correctly resolve packages that use the browser key. Like Jimple.
  • preferBuiltins: Set to true when the target is for Node. It shouldn't try to use native Node modules when the target is for browser.

How should it be tested manually?

For browser, you can try building a browser target that imports Jimple.

For preferBuiltins, you can try building a browser target that imports querystring.

And of course...

npm test
# or
yarn test

@coveralls
Copy link

Pull Request Test Coverage Report for Build 8

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 4: 0.0%
Covered Lines: 1273
Relevant Lines: 1273

💛 - Coveralls

@homer0 homer0 merged commit abbb665 into next Jul 2, 2018
@homer0 homer0 deleted the homer0_fixResolve branch July 2, 2018 15:44
@homer0 homer0 added the on:next label Jul 2, 2018
@homer0 homer0 mentioned this pull request Jul 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants