Skip to content

Commit 0d7e766

Browse files
committed
fix: remove webpack-preprocessor from cypress config
Removes the `@cypress/webpack-preprocessor` from the generated cypress configuration, as it leads to several issues regarding file watching, headless mode and TS support. Note that the dependency is still there, so any user needng it back just have to uncomment the lines in the generated config. Fixes #2903
1 parent 662b1d3 commit 0d7e766

File tree

1 file changed

+12
-6
lines changed
  • packages/@vue/cli-plugin-e2e-cypress/generator/template/tests/e2e/plugins

1 file changed

+12
-6
lines changed

packages/@vue/cli-plugin-e2e-cypress/generator/template/tests/e2e/plugins/index.js

+12-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
// https://docs.cypress.io/guides/guides/plugins-guide.html
2-
/* eslint-disable import/no-extraneous-dependencies, global-require */
3-
const webpack = require('@cypress/webpack-preprocessor')
2+
3+
// if you need a custom webpack configuration you can uncomment the following import
4+
// and then use the `file:preprocessor` event
5+
// as explained in the cypress docs
6+
// https://docs.cypress.io/api/plugins/preprocessors-api.html#Examples
7+
8+
// /* eslint-disable import/no-extraneous-dependencies, global-require */
9+
// const webpack = require('@cypress/webpack-preprocessor')
410

511
module.exports = (on, config) => {
6-
on('file:preprocessor', webpack({
7-
webpackOptions: require('@vue/cli-service/webpack.config'),
8-
watchOptions: {}
9-
}))
12+
// on('file:preprocessor', webpack({
13+
// webpackOptions: require('@vue/cli-service/webpack.config'),
14+
// watchOptions: {}
15+
// }))
1016

1117
return Object.assign({}, config, {
1218
fixturesFolder: 'tests/e2e/fixtures',

0 commit comments

Comments
 (0)