Add "exports" to the package.json to make self-referencing import… - #239
Conversation
|
I'm fine with this change, it works when distributed by Node.js since it's located in a
It should have been a problem before that as well due to this line but I guess you didn't hit that code path, with the move to esbuild I changed this hack which you do run into.
We (esbuild) already do that, this is used to get the path to the root of the package, not the version. corepack/sources/commands/Enable.ts Lines 53 to 55 in 15ceb83 corepack/sources/corepackUtils.ts Line 197 in 15ceb83 |
|
Note that adding exports is a breaking change. |
|
How does this work when Corepack is installed with the Node.js installer? I would expect this hack not to work,
Thanks for the remainder, that wouldn't be a big deal to release Corepack 0.17.0. |
In that case Corepack is located in |
…s work
I'm getting the following error, probably due to the switch to ESBuild (Webpack used to embed the JSON info in the JS file):
This should fix it for me, but I'm unsure about others, maybe a better fix would be to embed the version string in the JS file? //cc @merceyz