-
Notifications
You must be signed in to change notification settings - Fork 26
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
Can't resolve 'global/window' (webpack) #21
Comments
This module is commonJS and not ESM. This sounds like a bug in webpack. I would not recommend using webpack configuration to expose I've used this module in the past to explicitly import document & window as packages instead of global variables. |
Technically it's not anyone's bug. Webpack is doing what my code asks, it's just that the provided URI happens to be incompatible with ESM. A solution and ideal upgrade would be to offer |
This appears to be because
global/window
is not a valid identifier in ES modules so every single example on the web fails:Thankfully in this case the solution was:
This might be fixable with
export
maps in package.json, but I'm not entirely sure.The text was updated successfully, but these errors were encountered: