I ran into a few issues when compiling my app as a Chrome Packaged App and thought I might see if anyone else has any experience with this. The other issue (inline JavaScript in the main.html) was trivial to resolve but this one might be a bit trickier.
The JavaScript implementation of LoadString that monkey generates uses a synchronous AJAX request, which isn't supported in packaged apps. My solution was to just add a global STRINGS variable with the strings inlined, and return STRINGS[path] instead of trying to make the synchronous request. The problem with that approach is that this requires edits to main.js, and while it's not hard to automate them, I'd rather not. :P
Is there any equivalent to IncBin or anything so I can avoid the situation to begin with?
|