Closed eunjae-lee closed 11 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
plugin-sandbox | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Oct 12, 2023 9:16am |
Interesting, thank you for the explanation.
What?
This PR replaces
__dirname
with something else.Why?
I ran
yarn bump-version
, but got this error:I'm not sure if I understand this issue 100% exactly. From my understanding, our library and the CLI gets transpiled to CJS. So using
__dirname
doesn't cause any problem.However, when running
bump-version.ts
, it's run in ESM scope. And__dirname
doesn't exist there. To work around this issue, we're not using__dirname
any more, and replace it another way. However I didn't replace all the other__dirname
occurrences in vite config files, and etc (that won't be executed in ESM scope).How to test? (optional)