amd-optimize icon indicating copy to clipboard operation
amd-optimize copied to clipboard

please add sugar syntax support for text plugin

Open 21paradox opened this issue 9 years ago • 2 comments

I have a module like below:

define(['jquery',
'knockout',
'text!template1.html',
'text!template2.html',
'text!template3.html',
'text!template4.html',
'text!template5.html',
'text!template6.html'],function($, ko){

  var t1 = require('text!template1.html') 
})

after amd-optimize:

define(['jquery',
'knockout',
'template1.html',
'template2.html',
'template3.html',
'template4.html',
'template5.html',
'template6.html'],function($, ko){

  var t1 = require('text!template1.html') // error throwing
})

please add sugar syntax support for text plugin. Thanks!

21paradox avatar Mar 02 '15 03:03 21paradox

I'm having this problem with the i18n plugin too: require(['i18n!somefile'], function(){ }); //it tries to require a i18n module -> 404 not found mypath/i18n (istead mypath/somefile)

rubenspgcavalcante avatar Mar 11 '15 19:03 rubenspgcavalcante

I write a tool gulp-tmpl2js to convert a.html to a.html.js . so, I can require a.html as js module without text plugin. You can take a try :smiley:

junmer avatar May 25 '15 11:05 junmer