Semantic-Org/Semantic-UI-LESS

How to remove unused components

MichalW opened this issue · 2 comments

Hi, I installed "semantic-ui-less" according to this guide:
https://react.semantic-ui.com/theming

Now, I have automatically included styles for all elements, modules, etc.
They are included even in the build.

In the previous version, I could turn them off in the file "semantic.json".

Is it currently possible to not include all components and reduce the final style file?

My mistake - I looked at the wrong package.

The customization I'm looking for is here:
https://semantic-ui.com/introduction/getting-started.html

By the way, it would be great if this package could do it too

I found a very easy way to remove unused styles using this package.

  1. Copy file semantic.less from /node_modules/semantic-ui-less to your src
  2. In this semantic.less file, you need change every paths:
    from:
    & { @import "definitions/globals/reset"; }
    to:
    & { @import "~semantic-ui-less/definitions/globals/reset"; }
  3. Find your import 'semantic-ui-less/semantic.less' (in your entry file) and change to:
    import './semantic.less';
  4. Now you can comment some lines in your semantic.less'