Skip to content
This repository was archived by the owner on Mar 13, 2022. It is now read-only.
This repository was archived by the owner on Mar 13, 2022. It is now read-only.

Should mark package.json dependencies as external by default #42

@mesqueeb

Description

@mesqueeb

I'm just thinking that for the es and cjs builds, it should mark all package.json dependencies as external by default:

const pkg = require('../package.json')
const external = Object.keys(pkg.dependencies || [])

Not doing so will include all dependencies as part of the resulting built files. This gives webpack of developers who import your package a harder time eliminating duplicate dependencies.

Please note that passing them as "external" in rollup, they don't need to be added as peer dependency. They will be installed automatically when a dev does npm i or yarn add on your package.

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