-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
CSS import breaks webpack 5 compilation #4287
Comments
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you've completed all the fields in the issue template so we can best help. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. |
@vincentferniotoclock I am experiencing this as well. Have you found a work-around without modifying semantic itself? |
We have only React components in this repo so we can't handle CSS issues, it should be. This should be reported into the upstream repo: https://github.com/Semantic-Org/Semantic-UI. The problem is that it's dead 🙄 Reasonable solution is to switch to https://github.com/fomantic/Fomantic-UI. |
Maybe it makes sense to mention that support for React is still missing in Formatic-UI, so it's not a drop-in replacement for semantic-ui-react. Just for semantic-ui-css, by using fomantic-ui-css, though I ran into the same issue doing that. I found that instead of installing semantic-ui-css, adding css as link to my React app's
|
@fholzer I also ran into the same issue while using semantic-ui-css and adding the css as link to my React app solved the issue. |
@fholzer The only solution that worked for me, thanks |
This issue is extremely annoying, to workaround it I created To use it:
|
@layershifter Thank you for creating this fix. It worked perfectly and solved this issue for my Electron React Boilerplate project as well - sharing the steps I ran, which were basically what you recommended: |
- upgrade semantic-ui deps to latest - install `@semantic-ui-react/css-patch` to fix `semantic-ui-css` issue (Semantic-Org/Semantic-UI-React#4287 (comment)) closes reanahub#204
- upgrade semantic-ui deps to latest - install `@semantic-ui-react/css-patch` to fix `semantic-ui-css` issue (Semantic-Org/Semantic-UI-React#4287 (comment)) closes reanahub#204
* upgrades React-SemanticUI * fixes code style * adds semantic-ui-css-patch to fix Semantic-Org/Semantic-UI-React#4287 * fixes prettier warnings
* upgrades React-SemanticUI * fixes code style * adds semantic-ui-css-patch to fix Semantic-Org/Semantic-UI-React#4287 * fixes prettier warnings
* upgrades React-SemanticUI * fixes code style * adds semantic-ui-css-patch to fix Semantic-Org/Semantic-UI-React#4287 * fixes prettier warnings
Solving many security alerts. See fix Semantic-Org/Semantic-UI-React#4287 (comment)
I am still receiving an error. I believe it's related to the 'step.overrides' file. The URL appears to be the same as the original semantic.css + step.css files. The double semi-colon appears still |
This patch tool (#4287 (comment)) covers changes in @bubbaspaarx please provide a repository with a repro case that I clone and check. |
Apologies. I realised my mistake. The patch works perfectly. One of our devs had created themes and imported the entire semantic package to the code base. Apologies. |
I encourage anyone who has information about the engineer that introduced the double comma bug in semantic ui react to let me know their details. I will promptly hit them with a truck. That is all, thank you. |
see Semantic-Org/Semantic-UI-React#4287 for more information
…nd/music (#20) * Bump react-scripts in /music-client-ui/src/frontend/music Bumps [react-scripts](https://github.com/facebook/create-react-app/tree/HEAD/packages/react-scripts) from 3.4.4 to 5.0.1. - [Release notes](https://github.com/facebook/create-react-app/releases) - [Changelog](https://github.com/facebook/create-react-app/blob/main/CHANGELOG-3.x.md) - [Commits](https://github.com/facebook/create-react-app/commits/react-scripts@5.0.1/packages/react-scripts) --- updated-dependencies: - dependency-name: react-scripts dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * bump version of node * resolve compilation error with useContextMenu * resolve semantic-ui-css import on webpack 5 see Semantic-Org/Semantic-UI-React#4287 for more information * remove unused type variable Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Steven Massaro <steven.massaro.web@gmail.com>
Bug Report
With Webpack 5 and css-loader 6, the CSS imports breaks the compilation.
Steps
Starts a new react app with webpack 5 and css-loader v6. Imports Semantic UI css in root component and it should stops working.
Expected Result
CSS should import correctly and app running as expected
Actual Result
An error occurs in
Version
2.0.4
Fix
The main reason for this is an extra ";" at line 19990 of
semantic.css
If removed, everything goes fine.
The text was updated successfully, but these errors were encountered: