Почему MUI стили на next.js 13 не билдятся в продакшн версии в основной css файл?
Почему стили от MUI компонентов на next.js 13 не билдятся в продакшн версии в основной css файл, а остаются тэгами style в head. Работаю с app router (с app директорией)
я правильно понял, что в данный момент styled компоненты специально так билдятся?
During server rendering, styles will be extracted to a global registry and flushed to the of your HTML. This ensures the style rules are placed before any content that might use them. In the future, we may use an upcoming React feature to determine where to inject the styles.
During streaming, styles from each chunk will be collected and appended to existing styles. After client-side hydration is complete, styled-components will take over as usual and inject any further dynamic styles.
We specifically use a Client Component at the top level of the tree for the style registry because it's more efficient to extract CSS rules this way. It avoids re-generating styles on subsequent server renders, and prevents them from being sent in the Server Component payload.