Pregunta

I'm new to and am loving Meteor. But, of course, every framework with nice features has flaws. For Meteor, it seems like the flaw is the amount of client-side scripts that have to be loaded to get an app rolling. Because of this, a relatively empty meteor app can take a bit longer to actually render anything than I'd like. I feel like it makes the site seem like it's broken for the first 6 seconds.

I know I could remove dependencies to save some time. I'm sure things are a bit better compressed outside of production mode as well, but in case this doesn't help when my app is finished, I'd like to be able to give the user some indication that the page is working.

One way I thought of doing this would be to add a background style while the scripts are loading. The problem with this seems to be that anything you add to a head tag in meteor gets loaded after the 20 or so scripts.

Is there any way to put style tags above Meteor's script tags and have styles render before scripts load and start processing?

¿Fue útil?

Solución

It appears that by adding css files to the "client" directory and leaving their link tags out of the head tag completely, the stylesheets load before the scripts, solving my problem.

Let that be a lesson to me.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top