Closed webpro closed 9 years ago
Hey @webpro,
I hadn't considered this case at all. Still, I'm a bit surprised it doesn't work (and gives no error indication).
I may have some time soon to dig in to see what's happening, but I really would like to wait until I've refactored curl. Are you ok with a not-pre-bundled-preload solution for now?
-- John
Thanks @unscriptable.
I'd rather wait for a next version, as this kinda ruins the curl setup in our project (gist + #216). No hard feelings, but I simply stick to require.js until I can finish the migration to curl. Unbundled preloads is an option of course, but a hassle to setup and probably undoes any performance gains.
I'm also willing to dig into curl myself for this, but it sounds like the refactoring is a serious one..?
Curious: why would unbundled preloads be a hassle or performance problem? cram.js will bundle them into a single file along with the app's non-preload modules.
When there are multiple
define()
calls in a bundle, configured to be preloaded inpreloads
, I'm getting no output at all.But when using the same modules as a regular dependency, it works fine.
Say, this is
preloadLib.js
(bundled, so named modules):..then this fails:
..while this is OK (without the
preloads
config):Not getting any output from the failing case (also not with an
errback
).So, I was wondering whether this difference in behavior is on purpose? I thought I should be able to preload a built bundle.