Skip to content
This repository was archived by the owner on Sep 25, 2019. It is now read-only.
This repository was archived by the owner on Sep 25, 2019. It is now read-only.

Sagui bundles peerDependency when Importname is not equal peerDependencyname #404

@Kadrei

Description

@Kadrei

I have a libraryproject (lets call it ProjectA) depending on another project (lets call it ProjectB), but I do not want to have ProjectB bundled inside the package so I added it as a peerDependency.

When I only add it as a peerDependency a build fails because it cannot find ProjectB (which is used inside the package).
But when I add it as a devDependency it will build everything and also bundle the whole(!) ProjectB in the build. What I would expect is that sagui only bundles the dependencies imported which are not peer- & devdependencies.

When I install ProjectB per hand and only mention it as a peerDependency (so removing it from dev- & dependencies) it will still get bundled.

Expected behaviour would be that sagui bundles only dependencies from the dependencies-field and ignores/excludes dependencies from the peerDependencies-field (even though they may be found in the node_modules.
Also as stated before treeshaking does not seem to work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions