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

webpack sourceMap error in 5.4.0 #93

Closed
obartra opened this issue May 18, 2020 · 7 comments · Fixed by #94
Closed

webpack sourceMap error in 5.4.0 #93

obartra opened this issue May 18, 2020 · 7 comments · Fixed by #94

Comments

@obartra
Copy link

obartra commented May 18, 2020

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/webpack-preprocessor@5.4.0 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

@brian-mann
Copy link
Member

Fixing this now

@brian-mann
Copy link
Member

This is because you're passing transpileOnly option. If you drop that for now it will work... I'll get out a patch for this.

@josephzidell
Copy link

👍 for fixing this as I'm facing this issue as well

@chrisbreiding
Copy link
Collaborator

🎉 This issue has been resolved in version 5.4.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@brian-mann
Copy link
Member

@josephzidell and @obartra can you try this out and let us know if this fixes it?

@obartra
Copy link
Author

obartra commented May 19, 2020

It's working well for me, thanks for the fast turnaround! 🎉

@josephzidell
Copy link

works well. Thanks for the quick fix 🥇

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants