You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I set up my require.js project with the text plugin and built with r.js which inlined the text requirement. However, the load method of text depends on toUrl which require.js has, but almond does not since it does not support url loading. However, this resource was inlined so it really is available in the singular compressed file.
varparsed=text.parseName(name),nonStripName=parsed.moduleName+(parsed.ext ? '.'+parsed.ext : ''),url=req.toUrl(nonStripName),// Almond has no support for toUrluseXhr=(masterConfig.useXhr)||text.useXhr;
Is there a way to utilize text with almond after an r.js build?
The text was updated successfully, but these errors were encountered:
Actually, I think I may be doing something that the optimizer may not account for. Either that, or I'm doing something that I may not supposed to be doing. In my config, I set a path to my resource collection: images, json files, and such.
paths: {res: "../../res"}
Then in a module, I require that in with text!
define(["text!res/json/quotes.json"],function(quoteFile){// Do stuff with quoteFilereturnquoteFile;});
Am I not supposed to do this with paths? Using the path and running the unoptimized version works fine. But the optimized will resolve to the incorrect path.
@alberto-acevedo No, I don't believe that I did. I ended up just using the full require.js loader rather than almond. I was planning on comparing how dojo deals with the text plugin and comparing that to almond to see what the issue was.
I set up my require.js project with the text plugin and built with r.js which inlined the text requirement. However, the
load
method of text depends ontoUrl
which require.js has, but almond does not since it does not support url loading. However, this resource was inlined so it really is available in the singular compressed file.Is there a way to utilize text with almond after an r.js build?
The text was updated successfully, but these errors were encountered: