Open bitjson opened 9 months ago
Could you please supply a demo project with Yarn PnP?
Additionally, what Yarn version are you using? Maybe some version of Yarn PnP don't support ESM.
Thanks for looking into it @KusStar!
Here's a project where v0.11.0
works but v1.0.0
fails. It's using the latest stable yarn@4.0.2
.
It seems to be related to these issues: https://github.com/sheerlox/import-from-esm/issues/80 -> https://github.com/wooorm/import-meta-resolve/issues/10
It seems to be related to these issues: sheerlox/import-from-esm#80 -> wooorm/import-meta-resolve#10
Thanks for pointing out the solution, but the import-from-esm@1.4.0-alpha.1
is unstable, so maybe it was not a good fix now.
> [!CAUTION]
> In this alpha version, we are using the built-in `import.meta.resolve` function. It is still behind an experimental flag until Node v20.6.0, and as of v21.6.0, its `parentURL` parameter is still flagged. Hence, for this version of the library to work correctly, you _must_ run Node with the `--experimental-import-meta-resolve` flag.
Just use vite-bundle-visualizer@0.11.0
for now.
It currently only works in a limited way, installing and using it in your project via yarn add -D vite-bundle-visualizer
, yarn vite-bundle-visualizer
.
Contrary to expectations, yarn dlx vite-bundle-visualizer
is not working. However, #18 does resolve the yarn vite-bundle-visualizer
issue reported by the original issue reporter.
It only works in a limited way, so we'll need to reopen the issue.
Following this commit, Yarn projects with Plug'n'Play no longer works (version
0.11.0
worked so long as the project setyarn unplug vite-bundle-visualizer
).The error after upgrading to 1.0.0: