流星客户端 javascript 缩小和测量但没有修改变量名称 [英] Meteor client side javascript minification and mearging but no mangling variable names
问题描述
在 Meteor 中,如何在客户端缩小和合并 javascript;但不要修改/更改变量名/函数名?
In Meteor, How to minify and merge javascript on the client side; but don't mangle/change variable names/function names?
是否有任何捆绑选项可用?
Is there any bundling option available?
我目前正在使用:meteor bundle
和 --debug
选项;但根本没有做任何缩小.我希望捆绑和合并所有 js 和 cs 文件.
I am currently using : meteor bundle
with --debug
options; but is not doing any minification at all. I am looking to bundle as well as merge all js and cs files.
在更改变量名称时,我的 js 脚本中断了!什么是meteor在捆绑客户端js时使用的命令..它与uglify..有哪些选项我可以简单地删除修改变量名称选项"
On changing the variable names my js scripts breaks ! What is the command which meteor uses while bundling the client side js ..is it with uglify.. what are the options i can simply remove the "mangling variable names option"
注意:我不想使用meteor --production 或meteor bundle --debug.因为他们保留了所有文件..我有很多文件.以及包中的 js 文件.出于性能原因,我只是不想这样做.
NOTE: i don't want to use meteor --production or meteor bundle --debug. Since they keep all the files .. i have hell lot of files. And the js files from the packages. I simply don't want this for performance reasons.
推荐答案
当您在生产模式下运行 Meteor 时,它会自动缩小和捆绑您的 CSS 和 JS 到客户端:
Meteor automatically minifies and bundles your CSS and JS on the client when you run it in production mode:
meteor --production
这篇关于流星客户端 javascript 缩小和测量但没有修改变量名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!