I have wasted way too much time on google with this, and am still new to connect-assets.

So I want to use the build feature and have connect-assets concatenate and minify my javascript. However I can't have it mangling my variable names. There is an option in uglify.js that turns mangling off, but I have no idea how to access those options from this level.

connect-assets -> snockets -> uglify

here is my code:

app.use require('connect-assets')(src: "#{__dirname}/assets", build : true)
有帮助吗?

解决方案

https://github.com/TrevorBurnham/snockets/blob/150b06d92683bd3ee597012e5a9f11a3a1156320/src/snockets.coffee

line 319 is where the mangling occurs. As there is no conditional logic on it, no there is no option. I would suggest you fork the project and add the option you need.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top