Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRA5 + TW3 app fails to build due to Invalid mapping error in Css Minimizer plugin #7687

Closed
stephent opened this issue Feb 27, 2022 · 0 comments

Comments

@stephent
Copy link

What version of Tailwind CSS are you using?

3.0.23

What build tool (or framework if it abstracts the build tool) are you using?

"react-scripts": "5.0.0",
"autoprefixer": "^10.4.2",
"postcss": "^8.4.7"

What version of Node.js are you using?

14.17.5

What browser are you using?

Chrome 98

What operating system are you using?

macOS 12.1

Reproduction URL

https://github.com/stephent/cra-5-tw-3-build-fails

Describe your issue

On running npm run build against the reproduction project linked above, the build fails with the following error:

Failed to compile.

static/css/main.4bacc579.css from Css Minimizer plugin
Error: Invalid mapping: {"generated":{"line":3,"column":8651},"source":"static/css/main.4bacc579.css","original":{"line":330,"column":null},"name":null}

The project includes a file ./styles/custom.css with a single class, .my-class. If you edit line 2 and delete the applied rule bg-white, the project will build without a problem.

I tried a few different rules here and only managed to reproduce the build error when a background color rule was used.

I'm unclear if this problem lies in Tailwind, CRA 5, Webpack 5, CssMinimizerPlugin or some other web pack plugin, but I figured this would be the best place to make an initial bug report.

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant