amd-optimize
amd-optimize copied to clipboard
please add sugar syntax support for text plugin
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!
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)
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: