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

Deduped modules don't get included in worker blob #41

Open
jhiesey opened this issue Feb 27, 2018 · 1 comment
Open

Deduped modules don't get included in worker blob #41

jhiesey opened this issue Feb 27, 2018 · 1 comment
Labels

Comments

@jhiesey
Copy link

jhiesey commented Feb 27, 2018

This causes an exception at runtime when the missing module is required.

The resolveSources function tries to recursively find all dependencies, but it doesn't know about modules that are deduped, which have an entry in the modules map that looks like this:

"/Users/jhiesey/Projects/node/stream-http/node_modules/inherits/inherits_browser.js": [function(require, module, exports) {
    arguments[4]["/Users/jhiesey/Projects/node/airtap/node_modules/inherits/inherits_browser.js"][0].apply(exports, arguments)
}
, {}]

The module the dedupe entry points to ("/Users/jhiesey/Projects/node/airtap/node_modules/inherits/inherits_browser.js") needs to be included too, but resovleSources doesn't know that, so the dedupe entry throws at runtime.

@mourner
Copy link
Collaborator

mourner commented Mar 27, 2018

@jhiesey Sorry for a late response, and thanks for catching the bug! Would you mind submitting a PR with a fix?

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

No branches or pull requests

2 participants