WebOptimizer
WebOptimizer copied to clipboard
Not minifying my bundle at all
I have the following bundle
services.AddWebOptimizer(pipeline =>
{
pipeline.AddJavaScriptBundle("/js/vendor.js",
new[]
{
"/lib/js/vue.js",
"/lib/js/filepond-plugin-file-validate-type.js",
"/lib/js/filepond.js",
"/lib/js/bootstrap.bundle.js",
"/lib/js/jquery.js",
"/lib/js/tom-select.complete.js",
"/lib/js/vuejs-dialog.min.js",
"/lib/js/vue-filepond.js",
"/lib/js/iziToast.js"
});
});
Sadly it does not bundle my files. I tried everything. CodeSettings, MinifyJavascript() or a global MinifyScript = true.
I tried a manual bundle AddBundle but it has the same result.
I noticed that when I have a bundle with only 1 file the minification does work.
I have also discovered this issue. I also tried supplying the overload for CodeSettings
` pipeline.AddJavaScriptBundle( route: $"{PathConstants.CDNOutputRoot}/player-combined.min.js", new NUglify.JavaScript.CodeSettings() { LocalRenaming = NUglify.JavaScript.LocalRenaming.KeepLocalizationVars, MinifyCode = true, }, sourceFiles: new string[]{ "/Player/js/1.js", "/Player/js/2.js", "/Player/js/3.all.js", "/Player/js/4.JS", "/Player/js/5.js" });
`
I'm assuming that also didn't work right @uprightbass360 ?