@@ -23,33 +23,18 @@ module.exports = (on, config) => {
23
23
24
24
// Always apply webpack config for Cypress (both development and test environments)
25
25
if ( process . env . NODE_ENV === 'test' || process . env . NODE_ENV === 'development' ) {
26
- const baseWebpackConfig = require ( '../../configs/webpack.config' ) ;
27
-
28
- // Create a specific webpack config for Cypress tests that ensures browser modules
29
- const cypressWebpackConfig = {
30
- ...baseWebpackConfig ,
31
- resolve : {
32
- ...baseWebpackConfig . resolve ,
33
- alias : {
34
- // Force browser module resolution for Cypress tests
35
- '../input/input_stream/input_stream' : '../input/input_stream/input_stream_browser' ,
36
- './input_stream' : './input_stream_browser' ,
37
- 'input_stream/input_stream' : 'input_stream/input_stream_browser' ,
38
- }
39
- }
40
- } ;
41
-
26
+ const webpackConfig = require ( '../../configs/webpack.config' ) ;
42
27
console . log ( '=== CYPRESS WEBPACK CONFIG DEBUG ===' ) ;
43
- console . log ( 'Number of plugins:' , cypressWebpackConfig . plugins ? cypressWebpackConfig . plugins . length : 0 ) ;
44
- console . log ( 'Resolve aliases :' , cypressWebpackConfig . resolve . alias ) ;
45
- if ( cypressWebpackConfig . plugins ) {
46
- cypressWebpackConfig . plugins . forEach ( ( plugin , i ) => {
28
+ console . log ( 'Number of plugins:' , webpackConfig . plugins ? webpackConfig . plugins . length : 0 ) ;
29
+ console . log ( 'Has plugins :' , ! ! webpackConfig . plugins ) ;
30
+ if ( webpackConfig . plugins ) {
31
+ webpackConfig . plugins . forEach ( ( plugin , i ) => {
47
32
console . log ( `Plugin ${ i } :` , plugin . constructor . name ) ;
48
33
} ) ;
49
34
}
50
35
51
36
const webpackOptions = {
52
- webpackOptions : cypressWebpackConfig ,
37
+ webpackOptions : webpackConfig ,
53
38
watchOptions : { } ,
54
39
} ;
55
40
on ( 'file:preprocessor' , webpack ( webpackOptions ) ) ;
0 commit comments