-
Notifications
You must be signed in to change notification settings - Fork 68
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
"document is undefined" in WebWorker when importing styles from css module #16
Comments
Are you running a webpack bundle inside a web worker? Can you be more specific about your use case? |
@yyx990803 |
I know it has problems in workers, what I'm trying to understand is why you are using it inside a worker, since the worker has no access to the DOM. Are you trying to render Vue components in a worker? |
Just like what I’ve demonstrated in the repro, the worker just reads some exported constants from a CSS module. |
I’m experiencing this now when bundling a component package with |
--- wrong commit, sorry ---- |
vue-style-loader/lib/addStylesClient.js
Line 116 in af61a42
document
could beundefined
if a style file is required from a WebWorker.The text was updated successfully, but these errors were encountered: