Skip to content

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

Open

Description

@jhiesey

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.

Activity

  1. mourner commented on Mar 27, 2018

    @mourner
    Collaborator

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions