-
-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
require.resolve is only supported by webpack. When trying to migrate to Vite preprocessor with cypress-vite
I hit error that require doesn't exists.
cypress-react-selector/src/resqInjector.js
Lines 8 to 11 in 1c55294
| exports.waitForReact = (timeout = 10000, reactRoot, resqModulePath) => { | |
| const file = require.hasOwnProperty('resolve') | |
| ? require.resolve('resq') | |
| : 'node_modules/resq/dist/index.js'; |
I initially tried to add typeof require !== "undefined" but vite transforms it making the check useless.
I'm not sure what is a good solution, for now on my side I simply patched away the require.resolve call and use the hardcoded path
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels