Closed pahund closed 1 year ago
By default, Quokka uses esm module for JavaScript files, allowing ES imports and top level await to be used with zero configuration.
It looks like there is a compatibiltiy problem between the latest version of yarn
.pnp.cjs
file and the esm
package.
You can create a .quokka
file in the root of your project to fix the problem:
.quokka (configuration file)
{
"stdEsm": false
}
In the meantime, we'll investigate whether we can fix this in Quokka product instead of requiring a configuration file.
We've updated Quokka for IntelliJ to automatically set stdEsm
to false
when using yarn 3 workspaces.
Please update to the latest version, v1.0.369
, it should work for you.
✅ Confirmed, it works now! Thanks for the quick help!
Issue description or question
I'm using Yarn package manager, version 3.3.0, with the zero-installs feature enabled, as recommended in Yarn's setup guide.
In IntelliJ IDEA, when I create a JavaScript scratch file, Quokka immediately crashes with a long error message thrown by
IDEA.app.plugins/quokka-intellij/dist/node_modules/esm-wallaby/esm.js
The plug-in is not usable.
Sample repository link
https://github.com/pahund/quokka-problem
Quokka.js Console Output
Code editor version
IntelliJ IDEA 2022.3 (Ultimate Edition) Build #IU-223.7571.182, built on November 29, 2022
Non-Bundled Plugins: quokka.js (1.0.366)
OS name and version
macOS 13.0.1 “Ventura”