unnecessary injection of css when "clientRouting: false" #1785
Replies: 2 comments 4 replies
-
Update: I used the
I then built the client and server separately using the commands in the documentation. When building the client, everything works as expected (only one CSS file appears in the Is this the normal flow? How can I avoid this duplication? Additionally, if I haven't previously built the client, the server build produces an error. |
Beta Was this translation helpful? Give feedback.
-
created new app using Bati with
Changed :
All of that changes related to non clientRouting in my app After that built project with build command ( We are only interesting of the result of building css files. It's easily can be reproduce by setting Because of creation that separate almost similar css files in And if my css files are huge it will cause a big problem of first time render page value. I dont't know why after building server part also creates css file in So i expect that after building my project there will not be additional injection of css. project with changes can be reached in |
Beta Was this translation helpful? Give feedback.
-
I'm using "clientRouting: false" parameter in my
+config.js
file.So i no need in such files (hooks) as
"+onPageTransitionStart.js"
and"+onPageTransitionEnd.js".
but i figure out that css is still injecting in "/dist/client/assets/static/" folder (if hooks are present, css file is
"onPageTransitionStart.Db35thue.css"
, but when i remove that hooks - css file becomes"LayoutDefault.CNGbaUCn.css"
). So i get two almost identical css files"LayoutDefault.someHash.css"
which injects in head tag of body when i'm deploying pages.And when i'm using tailwind all of that classes are duplicated.
Beta Was this translation helpful? Give feedback.
All reactions