Skip to content
This repository was archived by the owner on Oct 1, 2020. It is now read-only.
This repository was archived by the owner on Oct 1, 2020. It is now read-only.

webpack sourceMap error in 5.4.0 #93

@obartra

Description

@obartra

Hi there, thanks for your work on cypress-webpack-preprocessor. It's been working great for us. I was just trying to update to the latest version and ran into some issues. Let me know if I can provide any additional info.

  • Operating System: MacOS 10.15.3
  • Cypress Version: 4.5.0
  • Browser Version: Google Chrome 81.0.4044.138 (Official Build) (64-bit)

Is this a Feature or Bug?

I'm guessing a breaking config change between 5.3.0 and 5.4.0 but I couldn't figure out how to make it work.

Current behavior:

@cypress/[email protected] throws an error when trying to generate source maps

Desired behavior:

Tests run

How to reproduce:

This is my webpack config:

const webpack = require('@cypress/webpack-preprocessor');

const extensions = ['.ts', '.tsx', '.js'];
const webpackOptions = {
  resolve: {
    extensions,
  },
  module: {
    rules: [
      {
        test: /\.tsx?$/,
        loader: 'ts-loader',
        options: { transpileOnly: true, sourceMaps: false },
      },
    ],
  },
};

module.exports = (on) => {
  on('file:preprocessor', (file) =>
    webpack({
      webpackOptions,
    })(file)
  );
};

Just trying to load any test fails with the webpack error below

Additional Info (images, stack traces, etc)

error

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions