DEV Community

nvish-dilpreetkaur
nvish-dilpreetkaur

Posted on

Missing Webpack Loader Running Cypress test with React

I am trying to run cypress test cases headless using cmd command

npx cypress run
But it gives me below error -

Image description

Do I need to install any dependency for this to load. Even css files are not getting loaded.

Also, do I need to create webpack config separately.

I installed css-loader and style-loader as dev dependency, and created webpack.cypress.config.js with below contents -

module.exports = {
    module: {
      rules: [
        {
          test: /\.css$/i,
          use: ["style-loader", "css-loader"],
        },
      ],
    },
};
Enter fullscreen mode Exit fullscreen mode

But this is not working.

Top comments (0)