Closed merceyz closed 7 months ago
What's the problem this PR addresses?
https://github.com/arcanis/clipanion/pull/120 caused ./lib/advanced/Cli.mjs to contain an unqualified import to the platform folder instead of the files in it.
./lib/advanced/Cli.mjs
platform
Fixes https://github.com/nodejs/corepack/pull/349#discussion_r1443780153
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.
node
sources/platform/package.json
browser
module
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*.
./lib/platform/node*
./lib/platform/browser*
Released as 4.0.0-rc.3
What's the problem this PR addresses?
https://github.com/arcanis/clipanion/pull/120 caused
./lib/advanced/Cli.mjs
to contain an unqualified import to theplatform
folder instead of the files in it.Fixes https://github.com/nodejs/corepack/pull/349#discussion_r1443780153
How did you fix it?
Import the
node
platform directly, remove thesources/platform/package.json
file, and add abrowser
andmodule
field to thepublishConfig
.This let's bundlers pick the
module
version and if they're bundling for a browser replace./lib/platform/node*
with./lib/platform/browser*
.