BundlerMinifier和WebCompiler在构建时不输出文件 [英] BundlerMinifier and WebCompiler does not output files on build

查看:128
本文介绍了BundlerMinifier和WebCompiler在构建时不输出文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们刚刚从构建中删除了Gulp,并使用了Bundler& Minifier( https://github.com/madskristensen/BundlerMinifier )和编译器(

We've just removed Gulp from our build and using the Bundler & Minifier (https://github.com/madskristensen/BundlerMinifier) and Compiler (https://github.com/madskristensen/WebCompiler) and both the bundleconfig.json and compilerconfig.json have "Enable bundle on build" and "Enable compile on build" ticked, but when I build or rebuild the solution, none of the output files are generated. If I right-click the json's and either "Update bundles" or "Re-compile all files" manually, then the files are generated all lovely jubbly. I did read that these packages would not compile on build due to bootstrap and would only compile on build if there are corresponding css and js output files already in the solution but I may have read that wrong ... Ideally I don't want to have to incl. all the files in GIT when merging my code up. Any help would be really useful. Thank you!

推荐答案

我整个上午都在为这个问题而苦苦挣扎,因为我的开发环境使用JS文件进行调试更容易,而我的产品使用的压缩版本却不是在保存或构建时更新.

I've been struggling with this problem all morning as my development environment uses a JS file to debug easier and my production uses a minified version which wasn't being updated on save or build.

我尝试将BundlerMinifier,WebCompiler和WebEsssentials中的每三个都与VS2017一起使用.可以确定的文件较少,除非我手动进行,否则JS根本不会编译(右键单击文件或更改可更新所有文件的compileconfig.json).

I tried to use each and all three of BundlerMinifier, WebCompiler and WebEssentials all with VS2017. Less files were OK, JS wouldn't compile at all unless I did it manually (right click on file or change compilerconfig.json which updates all).

最后,我使用了Task Runner Explorer,并为我的JS文件使用了构建之前"的绑定.以前在保存时编译的所有内容,我刚刚注意到我的缩小版已有3个月的历史了,因此显然某个地方的扩展或VS更新存在问题.因为有点偏执,所以我也绑定了Less文件,以防万一,至少现在是自动的.

In the end, I used the Task Runner Explorer and used a binding to 'Before Build' for my JS file. Everything previously compiled on save and I've just noticed my minified edition is three months old, so obviously a problem with an extension or VS update somewhere. Because I'm a bit paranoid, I've bound the Less files too just in case and at least now it's automated.

这篇关于BundlerMinifier和WebCompiler在构建时不输出文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆