bootstrap-loader
bootstrap-loader copied to clipboard
Is there anyway to load the bootstrap css inline on server side rendering development mode?
@idangozlan can you provide some more details of why you want to do this?
Cause i don't like the first seconds when the CSS hasn't loaded yet,i would like to have it inline in the HTML body as part of the response
On Mar 5, 2017 10:43, "Justin Gordon" [email protected] wrote:
@idangozlan https://github.com/idangozlan can you provide some more details of why you want to do this?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/shakacode/bootstrap-loader/issues/277#issuecomment-284214107, or mute the thread https://github.com/notifications/unsubscribe-auth/AB5hbbDWA6j7mbqGi5jnrpwGmv7iRz66ks5rinWggaJpZM4MP6Bu .
I'm also curious
Setting extractStyles
to false
in .bootstraprc did it for me.
@ERPedersen, @idangozlan Any chance that this should in the docs? If so, please help me with a doc PR.
@ERPedersen is this related to https://github.com/shakacode/bootstrap-loader/issues/276 ? I was not able to get it to work in my testing.
@bherila I just ran into this after a recent Webpack upgrade. Even if you have extractStyles: false
, if you also have css-loader?sourceMap
in your config the styles will load in <link rel="stylesheet" href="blob:http...">
causing a delay in style loading and showing unstyled elements until the "external" stylesheet loads.
Still looking into a way to get source maps back to being inline.
@ratherblue I think it's related to the source maps being unable to work without an absolute URI prefix being added at runtime.
In the end I decided to just hard code bootstrap css path from the CDN and then load only my specific styles through the loader (so no more bootstrap-loader for me). This also helps reduce the size of my bundle which I've been trying to do anyway (I'm approaching 4 MB here and bootstrap ain't helping! lol)