Skip to content

Fat WebJars Expand node_modules to Wrong Directories #124

Description

@jclyons

I wish to avoid using two parallel package management systems (sbt alongside npm and possibly grunt) so I'm attempting instead to incorporate an sbt plugin that runs webpack into our sbt-web workflow. Unfortunately webpack has ~100 transitive dependencies that take forever for sbt to resolve. My (hopefully temporary) workaround to using the single webpack npm webjar is to build a "fat" webjar containing all transitive dependencies and publish it to my company's S3 repository, so as not to slow down our CI build by several minutes.However, my fat webjar is expanding all of the webjar contents into a single directory in the node_modules directory.

In other words, after the expansion, I'm looking for:

node_modules/webjars/async-each/index.js
node_modules/webjars/async-each/README.md
node_modules/webjars/async-each/package.json
node_modules/webjars/async/lib/async.js
node_modules/webjars/async/package.json
node_modules/webjars/async/LICENSE_async-1.3.0
node_modules/webjars/async/README_async-1.3.0.md
node_modules/webjars/binary-extensions/binary-extensions.json
node_modules/webjars/binary-extensions/package.json
node_modules/webjars/binary-extensions/license_binary
...

and i'm getting:

node_modules/webjars/async-each/index.js
node_modules/webjars/async-each/README.md
node_modules/webjars/async-each/package.json
node_modules/webjars/async-each/lib/async.js
node_modules/webjars/async-each/LICENSE_async-1.3.0
node_modules/webjars/async-each/README_async-1.3.0.md
node_modules/webjars/async-each/binary-extensions.json
node_modules/webjars/async-each/package.json
node_modules/webjars/async-each/license_binary
...

Leaving aside whether this is a good idea or not (I do not plan on using any more than the most basic features of webpack, so upgrading webpack in the future may not even be necessary) - does anyone know why this might be happening? Is it a bug in sbt-web, or something wrong with the structure of my fat webjar?

Any help would be very much appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions