mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
53324b0cd2
GitOrigin-RevId: 1260312a0644f3bc60e007a840045974336e264d
19 lines
562 B
JavaScript
19 lines
562 B
JavaScript
module.exports = (on, config) => {
|
|
if (config.testingType === 'component') {
|
|
const { startDevServer } = require('@cypress/webpack-dev-server')
|
|
const merge = require('webpack-merge')
|
|
const path = require('path')
|
|
const devConfig = require('../../webpack.config.dev')
|
|
|
|
const webpackConfig = merge(devConfig, {
|
|
devServer: {
|
|
contentBase: path.join(__dirname, '../../../../public'),
|
|
stats: 'none',
|
|
},
|
|
})
|
|
|
|
on('dev-server:start', options => {
|
|
return startDevServer({ options, webpackConfig })
|
|
})
|
|
}
|
|
}
|