nextcloud / spreed

šŸ—Øļø Nextcloud Talk ā€“ chat, video & audio calls for Nextcloud
https://nextcloud.com/talk
GNU Affero General Public License v3.0
1.61k stars 428 forks source link

Decrease the bundle size and the build time #9406

Open ShGKme opened 1 year ago

ShGKme commented 1 year ago

How to use GitHub


Is your feature request related to a problem? Please describe.

The current production build is:

Describe the solution you'd like

Do not make unnecessary browser compatibility

Use modern bundling and transpiring tools

Consider dropping SASS preprocessor

Many things CSS preprocessors were used for are not relevant now. Modern CSS has modules, custom properties (aka CSS Variables), functions, calc, and even CSS Nesting. To support older browsers we can use PostCSS-Preset-Env. I believe, nowadays the main purpose of using SASS is making a very flexible reusable CSS, like CSS frameworks with grids and utils generations, plugins and etc.

Why use PostCSS processing instead of css preprocessor?

Missing feature

The only missing feature is nesting with adding suffixes like

.message {
  &__part {
    ...
  }
}

But on the other hand, this adding suffices it's harder to find a style rule by class because there is no message__part in the source.

ShGKme commented 1 year ago

Build time is better now by moving to ESBuild for transpilling and minifying.

But bundle size is still a problem.