Skip to content

Is pkg.source a safe import target? #1652

@alexkrolick

Description

@alexkrolick

Seems like trying to use package.json's source field could be a source of issues:

let main = [pkg.source, pkg.module, browser, pkg.main].find(

  • microbundle uses source to identify the pre-Babel source code of a module, which could be a problem if the bundle config for the consumer doesn't match the source
  • Is there an RFC for using source in imports like there is for jsnext or module? Seems safer to treat as reserved for internal use of the package.

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