-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Uncaught ReferenceError: require is not defined #5054
Comments
That's surprising; we ship esm modules (see the |
Looking a bit more closely, though, it seems like these lines may be causing the problem: blueprint/packages/icons/src/iconSvgPaths.ts Lines 23 to 24 in 54cb93f
Those are the only places we ship code referencing |
Thanks @adidahiya! I am trying exactly that right now. :) |
Confirmed. Your change (that you linked above) is causing this. When I move back to version 3.51.3 it works because it uses still the old import ( as opposed to require). |
fixed in v4 by #5108 |
Thanks a lot @adidahiya ! |
Environment
Package version(s):
"@blueprintjs/core": "4.0.0-beta.10",
"react": "^17.0.2",
"react-dom": "^17.0.2"
Operating System: MacOS
Browser name and version: Chrome
Code Sandbox
Link to a minimal repro: https://github.com/DataDeft/web-debug
Steps to reproduce
Clone repo, yarn install, yarn build, yarn serve, open the link and watch the blank page.
Actual behavior
It seems when using Vite as opposed to Webpack this problem surfaces. I do not know enough of frontend development to be able to investigate myself.
Uncaught ReferenceError: require is not defined
at vendor.75daa434.js:64
Expected behavior
Run without error.
Possible solution
Not sure.
The text was updated successfully, but these errors were encountered: