[kbn/optimizer] style performance improvements and expanded v8 theme support #70353
Closed
4 tasks done
Labels
enhancement
New value added to drive a business result
Meta
Team:Operations
Team label for Operations Team
v7.9.0
The
@kbn/optimizer
is currently building light and dark versions of every .scss stylesheet in the Kibana repo every time the optimizer is run, regardless of whether developers every need the dark mode styles. This slows down development and would be much worse when we start building 8.0 versions of these styles too.In order to expand support for more v8 theme development and to get some needed performance improvements in the
@kbn/optimizer
we are planning to limit the number of style variations the@kbn/optimizer
will create by default, while enabling it to make more variations. We'll do this by introducing aKBN_STYLE_THEME
environment variable that the@kbn/optimizer
will read. It's default value will bev7light
, it can be set to*
or a comma separated list ofv7light
,v7dark
,v8light
, andv8dark
.When a developer switches to a theme that is not being built an error will be thrown in the browser instructing the user how to fix the issue, so it should be relatively easy to discover why things aren't working.
_styling_constants.scss
importsKBN_OPTIMIZER_THEME
config for@kbn/optimizer
that only builds specific style typessassOptions.importer
The text was updated successfully, but these errors were encountered: