Skip to content

Conversation

@MarshallOfSound
Copy link

This adds a simple second tsconfig that has module: ES2022 and the required module field in the package.json so that bundlers like webpack can find it.

This is required in order for this package to work with @vercel/webpack-asset-relocator-loader which is a pre-requisite to using this module in certain webpack deployment environments (electron, single-package-executables, etc.)

I specifically chose to ship dist-esm instead of dist/cjs and dist/esm to avoid path resolution changes 🤷

Refs: electron/forge#2949
Refs: vercel/webpack-asset-relocator-loader#168

@reconbot
Copy link
Member

Should we be using the standardized exports field instead?

I specifically chose to ship dist-esm instead of dist/cjs and dist/esm to avoid path resolution changes 🤷

I wouldn't worry about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants