|
1 | 1 | /* eslint-disable no-undef */ |
2 | 2 | const { defineConfig } = require('cypress'); |
3 | 3 | const fs = require('fs'); |
4 | | -const { resolve } = require('path'); |
5 | | -// TODO: Upgrade @cypress/webpack-preprocessor to latest once Webpack is upgraded |
6 | | -const webpackPreprocessor = require('@cypress/webpack-preprocessor'); |
7 | | -// TODO: Use webpack-configs from shared.js once Webpack is upgraded |
8 | | -// const webpackConfigOptions = require('./config/webpack/shared.js'); |
| 4 | +// const { resolve } = require('path'); |
| 5 | +// // TODO: Upgrade @cypress/webpack-preprocessor to latest once Webpack is upgraded |
| 6 | +// const webpackPreprocessor = require('@cypress/webpack-preprocessor'); |
| 7 | +// // TODO: Use webpack-configs from shared.js once Webpack is upgraded |
| 8 | +// // const webpackConfigOptions = require('./config/webpack/shared.js'); |
9 | 9 |
|
10 | | -// TODO: Relocate the aliases to webpack-config and reference its options directly from shared.js. |
11 | | -const webpackConfigOptions = { |
12 | | - resolve: { |
13 | | - alias: { |
14 | | - '@cypress-dir': resolve(__dirname, 'cypress'), |
15 | | - }, |
16 | | - extensions: ['.js'], |
17 | | - }, |
18 | | -}; |
| 10 | +// // TODO: Relocate the aliases to webpack-config and reference its options directly from shared.js. |
| 11 | +// const webpackConfigOptions = { |
| 12 | +// resolve: { |
| 13 | +// alias: { |
| 14 | +// '@cypress-dir': resolve(__dirname, 'cypress'), |
| 15 | +// }, |
| 16 | +// extensions: ['.js', '.mjs'], |
| 17 | +// }, |
| 18 | +// module: { |
| 19 | +// rules: [ |
| 20 | +// { |
| 21 | +// test: /\.mjs$/, |
| 22 | +// include: /node_modules/, |
| 23 | +// type: 'javascript/auto' |
| 24 | +// } |
| 25 | +// ] |
| 26 | +// } |
| 27 | +// }; |
19 | 28 |
|
20 | 29 | module.exports = defineConfig({ |
21 | 30 | e2e: { |
@@ -59,12 +68,12 @@ module.exports = defineConfig({ |
59 | 68 | console.log('Actual args:', launchOptions.args); |
60 | 69 | return launchOptions; |
61 | 70 | }); |
62 | | - on( |
63 | | - 'file:preprocessor', |
64 | | - webpackPreprocessor({ |
65 | | - webpackOptions: webpackConfigOptions, |
66 | | - }) |
67 | | - ); |
| 71 | + // on( |
| 72 | + // 'file:preprocessor', |
| 73 | + // webpackPreprocessor({ |
| 74 | + // webpackOptions: webpackConfigOptions, |
| 75 | + // }) |
| 76 | + // ); |
68 | 77 | }, |
69 | 78 | }, |
70 | 79 | }); |
0 commit comments