question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cli: bump style-loader and mini-css-extract-plugin to latest major versions

See original GitHub issue

Expected Behavior

Should be able to bump these two without issues

Current Behavior

Bumping them results in the following error when building:

Error: Failed to compile.
chunk kyma-project [initial]
static/module-kyma-project.31d3f200.js
Conflict: Multiple chunks emit assets to the same filename static/module-kyma-project.31d3f200.js (chunks 14 and 14)

And when including a content hash in the filename to ensure uniqueness, you get this:

Error: Failed to compile.
static/module-kyma-project.1e9dec32.ab58b93b.js from Terser
Unexpected token: punc (.) [webpack://./node_modules/@kyma-project/asyncapi-react/lib/styles/fiori.css:13,0][static/module-kyma-project.1e9dec32.ab58b93b.js:13,0]

Possible Solution

Seems like duplicate assets are emitted, possibly one CSS and one JS one, but not sure exactly what’s going on.

Steps to Reproduce

  1. Bump mini-css-extract-plugin to 1.3.4 and style-loader to 2.0.0
  2. Run yarn build in packages/app

Context

https://github.com/backstage/backstage/pull/4139

Your Environment

  • NodeJS Version (v12): v12.16.3
  • Operating System and Version (e.g. Ubuntu 14.04): MacOS 10.15.7
  • Browser Information: N/A

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Rugvipcommented, Jan 20, 2021

So you mean it’s not directly related to the asyncapi-react module?

Yep!

1reaction
Fox32commented, Jan 20, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

MiniCssExtractPlugin - webpack
This plugin extracts CSS into separate files. It creates a CSS file per JS file which contains CSS. It supports On-Demand-Loading of CSS...
Read more >
mini-css-extract-plugin WARNING in chunk ... - Stack Overflow
It can easily become an annoying bug! I can see it being reported in every framework -- e.g. in issue #5372 in create-react-app, ......
Read more >
A tale of Webpack 4 and how to finally configure it in the right ...
This is a major reason why the configuration files are so different: with a different version combination of the same tools things might ......
Read more >
webpack/webpack - Gitter
Hi have installed the latest versions of webpack, webpack-cli, and webpack-dev-server locally and globally. Cli commands 'webpack', 'webpack info' and ...
Read more >
A mostly complete guide to webpack 5 (2020)
Today CLI tools as create-react-app or Vue cli abstract away most of ... To start off with webpack create a new folder and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found