parcel-bundler/parcel

Is pkg.source a safe import target?

Closed this issue · 2 comments

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.

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

We should be using the actual babel config of that package in this case.

Is there an RFC for using source in imports

There is no spec for package.json that actually reflects the current usage.

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.