Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use the browser field in the root package.json #155

Merged
merged 1 commit into from Jan 21, 2024

Conversation

merceyz
Copy link
Contributor

@merceyz merceyz commented Jan 7, 2024

What's the problem this PR addresses?

#120 caused ./lib/advanced/Cli.mjs to contain an unqualified import to the platform folder instead of the files in it.

Fixes nodejs/corepack#349 (comment)

How did you fix it?

Import the node platform directly, remove the sources/platform/package.json file, and add a browser and module field to the publishConfig.

This let's bundlers pick the module version and if they're bundling for a browser replace ./lib/platform/node* with ./lib/platform/browser*.

@arcanis arcanis merged commit ec308a4 into arcanis:master Jan 21, 2024
6 checks passed
@merceyz merceyz deleted the merceyz/fix/browser-field branch January 21, 2024 11:06
@arcanis
Copy link
Owner

arcanis commented Jan 21, 2024

Released as 4.0.0-rc.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants