Replies: 1 comment 5 replies
-
Use Vanilla JavaScript. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to use
jsdom
in a web worker in a browser.With
vite-plugin-node-polyfills
for the node polyfills everything works fine in development but in release builds I getReferenceError: require is not defined
.I found some mention of using the following configuration, but that doesn't seem to change anything.
The issue can be reproduced with this repo: https://github.com/codegraft/vite-jsdom-repro
Release builds will show the error
ReferenceError: require is not defined
in the JS console.Any help would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions