2021-06-04 16:19:12 +00:00
|
|
|
module.exports = (on, config) => {
|
2021-06-05 03:55:28 +00:00
|
|
|
if (config.testingType === 'component') {
|
2021-09-21 13:48:28 +00:00
|
|
|
const { startDevServer } = require('@cypress/webpack-dev-server');
|
2021-06-05 03:55:28 +00:00
|
|
|
|
|
|
|
|
// Your project's Webpack configuration
|
2021-09-21 13:48:28 +00:00
|
|
|
const webpackConfig = require('../../webpack.config.js');
|
2021-06-05 03:55:28 +00:00
|
|
|
|
2021-09-21 13:48:28 +00:00
|
|
|
on('dev-server:start', (options) => startDevServer({ options, webpackConfig }));
|
2021-06-05 03:55:28 +00:00
|
|
|
}
|
|
|
|
|
|
2021-09-21 13:48:28 +00:00
|
|
|
return config;
|
|
|
|
|
};
|