Skip to content

Commit

Permalink
fix: get next config before requiring devserver (#15885)
Browse files Browse the repository at this point in the history
* fix: get next config before requiring devserver

* lint

Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
  • Loading branch information
djsilcock and lmiller1990 committed Apr 13, 2021
1 parent cb9faa8 commit 6e5fd8f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions npm/react/plugins/next/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
const { startDevServer } = require('@cypress/webpack-dev-server')
const findNextWebpackConfig = require('./findNextWebpackConfig')

module.exports = (on, config) => {
on('dev-server:start', async (options) => {
return startDevServer({ options, webpackConfig: await findNextWebpackConfig(config) })
const webpackConfig = await findNextWebpackConfig(config)

// require('webpack') now points to nextjs bundled version
const { startDevServer } = require('@cypress/webpack-dev-server')

return startDevServer({ options, webpackConfig })
})

config.env.reactDevtools = true
Expand Down

4 comments on commit 6e5fd8f

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 6e5fd8f Apr 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/7.1.1/circle-develop-6e5fd8f4fc0c3b3a06318dee8d3f358e7a86e484/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 6e5fd8f Apr 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AppVeyor has built the win32 ia32 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/7.1.1/appveyor-develop-6e5fd8f4fc0c3b3a06318dee8d3f358e7a86e484/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 6e5fd8f Apr 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AppVeyor has built the win32 x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/7.1.1/appveyor-develop-6e5fd8f4fc0c3b3a06318dee8d3f358e7a86e484/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 6e5fd8f Apr 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/7.1.1/circle-develop-6e5fd8f4fc0c3b3a06318dee8d3f358e7a86e484/cypress.tgz

Please sign in to comment.