diff --git a/packages/e2e-cypress/package.json b/packages/e2e-cypress/package.json index 29b89bda..e0a5899f 100644 --- a/packages/e2e-cypress/package.json +++ b/packages/e2e-cypress/package.json @@ -35,6 +35,7 @@ "@cypress/vite-dev-server": "^2.2.2", "@cypress/vue": "^3.1.0", "@cypress/webpack-dev-server": "^1.8.3", + "coverage-istanbul-loader": "^3.0.5", "cross-env": "^7.0.3", "cypress": "^9.5.2", "lodash": "^4.17.21", @@ -44,7 +45,6 @@ }, "devDependencies": { "@types/lodash": "^4.14.178", - "coverage-istanbul-loader": "^3.0.5", "rimraf": "^3.0.2" } } diff --git a/packages/e2e-cypress/src/index.js b/packages/e2e-cypress/src/index.js index 53520429..5346eba1 100644 --- a/packages/e2e-cypress/src/index.js +++ b/packages/e2e-cypress/src/index.js @@ -41,18 +41,15 @@ module.exports = async function (api) { ); }); } else { - if (api.hasWebpack === true) { - api.extendWebpack((cfg) => { - cfg.module.rules.push({ - test: /\.(js|ts|vue)$/, - loader: '@jsdevtools/coverage-istanbul-loader', - options: { esModules: true }, - enforce: 'post', - include: path.join(__dirname, '..', '..', '..', '..', 'src'), - exclude: [/\.(e2e|spec)\.(js|ts)$/, /node_modules/], - }); + api.extendWebpack((cfg) => { + cfg.module.rules.push({ + test: /\.(js|ts|vue)$/, + loader: '@jsdevtools/coverage-istanbul-loader', + options: { esModules: true }, + enforce: 'post', + exclude: [/\.(e2e|spec)\.(js|ts)$/, /node_modules/], }); - } + }); } } };