-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
问下压缩策略问题 #74
Comments
可以不让它合并,即每个模板单独输出一个 js 文件,再使用第三方打包方案 |
说一下,我现在使用的gulp watch监测文件,然后combo设置成false,模版js文件就分开了:
|
我现在的做法是使用tmodjs 生成cmd模式,再使用grunt concat合并,页面加载时报模板错误。 <script type="text/javascript">
seajs.config({
base: "../scripts/",
alias: {
"zepto": "zepto/zepto-cmd.min",
"fastclick": "fastclick.min",
"member": "tpl/member",
//"member-list": "tpl/memberList",
//"member-view": "tpl/memberView",
"home": "modules/src/home"
}
});
seajs.use("home");
</script> home中我这样写,报模板错误 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
现在,一些模版是共用的,在Public里,一些不是共用的,在tpl里。按照demo里写的,就把所有页面的模版都压缩在一个template.js里了,这样会不会很大?而且我感觉也不爽,因为用不到的模版也加载进来了。
请问这样怎么解决?是分成多个template.js么,这样的话,使用tmod命令就挺麻烦的。纠结~~
希望给出一个方向。。。
The text was updated successfully, but these errors were encountered: