three-stdlib icon indicating copy to clipboard operation
three-stdlib copied to clipboard

fix: correctly flag targets for Node resolution

Open CodyJasonBennett opened this issue 3 years ago • 1 comments

Why

Fixes #153

What

We need to clearly mark CJS/ESM targets for Node to resolve correctly in environments like SSR. type="module" flags the package as a module (inferred for .js extensions) and .cjs is used to explicitly mark the main target as commonjs. Alternatively, we can simply use .mjs and .js but I'd prefer to play nicer on older web tools like CRA.

Checklist

  • [ ] Documentation updated
  • [ ] Storybook entry added
  • [x] Ready to be merged

CodyJasonBennett avatar May 10 '22 13:05 CodyJasonBennett

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit ef6a3351a15f711f5252ca85365c188585942976:

Sandbox Source
three-stdlib-ssr Configuration

codesandbox-ci[bot] avatar May 10 '22 13:05 codesandbox-ci[bot]

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
three-stdlib ✅ Ready (Inspect) Visit Preview Sep 18, 2022 at 11:29AM (UTC)

vercel[bot] avatar Sep 18 '22 11:09 vercel[bot]

:tada: This PR is included in version 2.15.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Sep 18 '22 11:09 github-actions[bot]