Our app has several different pages, with very different functionality, but a few common libraries and widgets. So I've implemented controllers that are the "main" script for each page. And then I'm building using a process like this:
./js section1/app1/scripts/buildcss.js // Generate production.css -- buildcss.js is build.js except it only does "steal/build/styles"
1. I dig that it can create shared packages automagically, pretty neat. Except in our case, it ends up splitting up too much, and most pages pull in several of these shared packages, pushing up the number of requests. Is there a way to define the packages manually?
2. CSS doesn't seem to have a similar packaging process, so I have to build them each manually first. But worse, each app's production.css ends up having alot of duplicate styles from common shared plugins. Is there any way to reduce this overhead? Or best to way for steal to integrate something like this?
3. I realise the next version of steal is on the horizon. Perhaps my issues are resolved by that, but is it stable enough to use?
1. There is not. But it should only be creating 2-3 files to load. There might be a bug if otherwise.
2. You could implement multi-build for CSS yourself. I can describe it. But, don't be too worried about duplicate loading. Depending on your site, it actually could be much better to load everything at once and ignoring the benefits of caching.
3. It is. Your issues will mostly be resolved by that b/c it allows fine grained control over splitting dependencies. But, it is not ready.
Am I doing something wrong or it's a known bug/issue? Is there a way to switch to production mode on release date in a single place instead of changing the mode in every html page like this ../../steal.js?app/page1,development? Please advice.
I had a look and it seems that it's failing in steal/buildjs when it does "steal.build.apps(urls)" because steal.build no longer has an apps function. I think the functionality was moved to steal/build/apps/apps.js but I haven't been able to get it to work.
But yes, I agree that I can't wait for the new steal to be finalised, especially for multibuild ;)
Leave a comment on asavoy's reply
Change topic type
Link this topic
Provide the permalink of a topic that is related to this topic