waitForReact throws an error when using Webpack
ajhenry opened this issue · comments
When using webpack with require.resolve
, this will return a number rather than a path so this breaks the waitForReact
function.
Webpack warning when using require.resolve
: https://webpack.js.org/api/module-methods/#requireresolve
Issue describing that require.resolve
returns a dependency ID in webpack: webpack/webpack#1554
Module ID's type can be a number or a string depending on the optimization.moduleIds configuration.
Code that uses require.resolve
cypress-react-selector/src/resqInjector.js
Lines 9 to 15 in 240f5fe
Error
readFile: 27, utf8, {log: false}
cy.readFile() must be passed a non-empty string as its 1st argument. You passed: 27.
Versions
"cypress": "^8.5.0"
"cypress-react-selector": "^2.3.13"
"webpack": "^4",
Sure I can take a crack at that this week
So I tried the solution with eval
and that returned a weird webpack internal object rather than a path so I'm going to keep investigating
Closed via #279