Open githubakarsh opened 4 months ago
I don't think there will be much to go on here without some code or some way to reproduce.
@jennifer-shehane , the code is not public, we cannot share the code here.
The error code :
Webpack Compilation Error Module parse failed: Unexpected token (1:0) You may need appropriate loader to handle this file type, currently no loaders are configured to process this file. Se .... <Svg ..... />
The above are the debug logs when we are trying to import the reducer slice in cypress files . Example :
File name : component.test.cy.js
import { componentSlice } from ''../slices;
error when importing : Webpack Compilation Error Module parse failed: Unexpected token (1:0) You may need appropriate loader to handle this file type, currently no loaders are configured to process this file. Se .... <Svg ..... />
We use : file-loader and svg-inline-loader in webpack and we don't use svg's in reducer files and hence forth we expect we should not be getting the above error when we use "npx cypress open"
Current behavior
When I import redux store and use a dispatch function. I am getting :
Note : We are using file-loader and svg-inline-loader to handle SVG in webpack5
Its bit weird, when I import Store and Slice file to dispatch am getting SVG related compilation error. If I remove the import , there is no compilation error. I am stuck and can't dispatch to the slice of react-redux.
Desired behavior
Test case should be run with out any failure
Test code to reproduce
I cannot add the code here since its a private repo
Cypress Version
13.8.0
Node version
18.18.0
Operating System
windows
Debug Logs
Other
We are using file-loader and svg-inline-loader to handle SVG in webpack5