Skip to content

webpack output is not used for "browser" #2613

Open
@cwillisf

Description

@cwillisf

Expected Behavior

We should use the build output we generate; we should not generate unused build output.

Actual Behavior

We currently use webpack to build two targets: a set of "commonjs2" output under dist/ and a set of UMD output under dist/web/. Our package.json lists:

  "main": "./dist/vertical.js",
  "browser": "./shim/vertical.js",

This means we're instructing "browser"-style consumers of this module to use the build input, not the build output. The webpack output in dist/web/ is not being used.

This also means that exports-loader and imports-loader need to be listed in our dependencies so that scratch-gui has access to those loaders at scratch-gui's build time.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions