-
Notifications
You must be signed in to change notification settings - Fork 265
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 build contains keyword require
crash web app
#1073
Comments
Thanks for report @joshuajiangdev. This issue is likely to be addressed in the the next major releases. Until then, you could either |
Do you have timelines for the next release? |
Closed
Another options is to let babel loader to transpile the ESM bundle, here is an example to follow. |
Fixed in v6.2. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I'm getting
ReferenceError: require is not defined
from my web at the lineul=require("js-cookie")
. My vite build is using build targetsmodules
, which according to this libs'package.json
:is going to load package from
"esm/index.js"
, so I checked that file and could find the codevar Cookies = require('js-cookie');
there. Curious if this is intended or a mistake to include keywordrequire
keyword in an esm build.The text was updated successfully, but these errors were encountered: