"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 |
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: