-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESM file cannot be loaded by require
#2
Comments
It's a bug in version 1.0.0, please use v1.0.1 |
Fixed in 1.0.1 |
Hey @stauren , thank you.
|
That's weird. Can you post your vite config related to the plugin? I am using a full ESM setup, it seems it's been loaded with 'require', try 'import'. |
Sure, here it is:
|
According to the vite documentation: http://vitejs.dev/guide/troubleshooting.html#this-package-is-esm-only You could:
I think this is because I only provided the ESM version in the package, a little radical, haha. |
Since ESM is the future, and there is dual package hazard, maybe we could all contribute a little for the future? That's why I choose the ESM-only solution. |
Add support for cjs format export in 1.0.2. |
cjs node API is officially deprecated in vite 5.0: https://vitejs.dev/guide/migration#deprecate-cjs-node-api |
Hello @stauren
Screenshots : |
@arnriu Thank you so much. 1.0.3 should fix this silly bug. |
I wanted to give a try to this plugin.
But unfortunately, I've got an error:
The text was updated successfully, but these errors were encountered: