Closed lorenzocostalunga closed 10 years ago
I didn't think "dontAddFileExt" was suppose to apply to non-AMD modules? Plugins should control their own behavior.
The "js!" plugin should not be adding an extension...
Is there any reason why we can't allow plugins to use this config option?
@lorenzocostalunga: what is your use case? Can you describe the situation?
I need to load scripts and css combined (see MVC4 Bundling: http://www.asp.net/mvc/tutorials/mvc-4/bundling-and-minification).
scripts: /bundles/jquery /bundles/jqueryUI /bundles/jqueryWithUI /bundles/modernizr /bundles/base
css: /bundles/jQueryUI/themes/baseAll /bundles/themes/base/css /bundles/css
use:
curl={ baseUrl:'/scripts/', dontAddFileExt:'.bundles/.', paths:{'link!':'/css/'} .... };
curl( [ 'js!/bundles/base!order', 'js!/bundles/myGrid!order', 'js!/bundles/pageScripts', 'js!/Scripts/myScript.js!order', 'css!/bundles/css', 'css!/css/page.css' ..... ] ).next(pageModules).then ....
thanks
workaround: at line 137 of js plugin:
// url = nameWithExt(require'toUrl', 'js'); /// LORENZO url = require'toUrl';
if (!config.dontAddFileExt.test(url)) url = nameWithExt(url, 'js');
sorry for my bad english