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

browserify vs bpkg #9

Open
nodech opened this issue May 15, 2019 · 0 comments
Open

browserify vs bpkg #9

nodech opened this issue May 15, 2019 · 0 comments

Comments

@nodech
Copy link
Member

nodech commented May 15, 2019

I noticed there's small difference with browserify vs bpkg backends.
bpkg correctly translate main using browser mappings where browserify
does not translate it using browser mappings.

command: ./node_modules/.bin/bmocha --open -m "$BMOCHA_CHROME" test/*-test.js

e.g.
package.json of the library being used.

{
  "name": "test",
  "main": "./lib/test.js",
  "browser": {
    "./lib/test": "./lib/test-browser.js"
  }
}

This will fail(wont resolve to browser) with browserify backend:

const lib = require('test');

but following will work on both:

const lib = require('test/lib/test');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant