Component Testing in Monorepo. DevServer can't find webpack config #23289
Unanswered
bryanjos
asked this question in
Component Testing
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi 👋🏿
Cypress: 10.4.0
@cypress/webpack-dev-server: 2.0.0
Next: 12.1.2
I'm migrating from Cypress 8.3.1 to 10.4.0. I've gotten most things working except for updates for component testing. I have a monorepo that's set up like so:
I'm updating the config from json to typescript and having trouble configuring the new devServer configuration to work.
Using the following, doesn't seem to work. I get a bunch of compilation errors from webpack because it can't find my configuration
Same with with using some code I had for 8.3.1 to get the webpack config and pass to the devServer
It feels like the webpackConfig is getting ignored.
I went digging into the
@cypress/webpack-dev-server
and looked at theloadWebpackConfig
function in thenextHandler
module. I see that it tries to use theprojectRoot
to try to get the next config in the call toloadConfig
. If I manually change the second argument fromdevServerConfig.cypressConfig.projectRoot
to the path to my next project, everything works. But of course that's not a viable solution to change the package like so.So I was wondering if there is a better way to tell the devServer where my next config lives?
Beta Was this translation helpful? Give feedback.
All reactions