> In this case, those modules were simply missing from the @require annotations
> in sjs:std and mho:env - I've added them in now, thanks!
Yup, I figured that, which is why I specified which modules were missing from sjs:std and mho:std.
> you usually want the browser to cache `stratified.js` separately (it'll be
> modified much less frequently than your bundle)
I realized that after I posted my message: I'm actually using SJS in 3 different HTML pages, so having stratified.js be separate from the bundle is useful even in my use-case (not for latency reasons, but for file size reasons: having 3 copies of stratified.js means a bigger file size for my extension!).
> for the fastest load times, you will often bundle only modules that are
> needed on page load, leaving additional modules to load lazily over HTTP
> if/when they're needed.
Yup, that's good advice, though not applicable to my use-case (where all files are loaded from the disk no matter what).
> That's not to say we shouldn't support the fully-bundled case you describe,
> it's just not our sole aim with the bundle module.
Of course. I completely agree with having multiple ways to bundle things up, because people have different use cases.
> That I can help you with! As a bit of an experiment a while back, we created
> the `stratified-aot.js` version of the runtime for use in Chrome apps (which
> also forbid `eval`). We haven't publicized this (it's rather experimental),
> but it does exist in the git repo :).
I did see "stratified-aot.js" in the repo, but I figured it was intended for precompiling SJS code (I was unaware that even some builtins are written in SJS).
I replaced "stratified.js" with "stratified-aot.js" and used the "main" attribute to load my app, and it worked, no more eval! I'll let you know if I run into any problems/bugs.
I'll also try stripping out the compiler and see how well that works.
> The code in stratified.js to figure out which is the "main script tag" uses
> some heuristics, so if you're concatenating your own stratifiedjs+bundle
> file, you may still need to name it "stratified-<something>.js".