Skip to content

Commit 4d6a399

Browse files
committed
fix(cypress): add import to webpack options
Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev> (cherry picked from commit 74fd04f)
1 parent 05afe58 commit 4d6a399

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

cypress/plugins/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ const webpackPreprocessor = require('@cypress/webpack-batteries-included-preproc
2121
module.exports = (on, config) => {
2222
cypressSplit(on, config)
2323

24-
on('file:preprocessor', webpackPreprocessor())
24+
const webpackOptions = webpackPreprocessor.getFullWebpackOptions()
25+
webpackOptions.resolve.conditionNames = ['import', ...(webpackOptions.resolve.conditionNames ?? [])]
26+
27+
on('file:preprocessor', webpackPreprocessor({ webpackOptions }))
2528

2629
return config
2730
}

0 commit comments

Comments
 (0)