bundling-and-minification

With Webpack, is it possible to generate CSS only, excluding the output.js?

て烟熏妆下的殇ゞ 提交于 2020-05-24 08:17:32
问题 I'm using Webpack with the extract-text-webpack-plugin. In my project, I have some build scripts. One of the build scripts is supposed to bundle and minify CSS only. As I'm using Webpack for the other scripts, I found it a good idea to use Webpack even when I only want to bundle and minify CSS . It's working fine, except that I can't get rid of the output.js file. I don't want the resulting webpack output file. I just want the CSS for this particular script. Is there a way to get rid of the

Microsoft.AspNet.Web.Optimization JavaScript bundling fails to minify template literals

我只是一个虾纸丫 提交于 2020-03-01 06:48:51
问题 Using the latest version of Microsoft.AspNet.Web.Optimization v1.1.3 I am unable to get bundling to minify the JavaScript if it includes template literals. For example if I include the following in one of my bundle scripts: var name = 'Bob'; var formattedName = `${name} says hello`; The resulting bundle will join all files but it won't minify code, and gives me this error: /* Minification failed. Returning unminified contents. (2,13-14): run-time error JS1014: Invalid character: ` (2,15-16):

Microsoft.AspNet.Web.Optimization JavaScript bundling fails to minify template literals

久未见 提交于 2020-03-01 06:47:04
问题 Using the latest version of Microsoft.AspNet.Web.Optimization v1.1.3 I am unable to get bundling to minify the JavaScript if it includes template literals. For example if I include the following in one of my bundle scripts: var name = 'Bob'; var formattedName = `${name} says hello`; The resulting bundle will join all files but it won't minify code, and gives me this error: /* Minification failed. Returning unminified contents. (2,13-14): run-time error JS1014: Invalid character: ` (2,15-16):

MVC CDN fallback for Style Bundle

杀马特。学长 韩版系。学妹 提交于 2020-02-01 20:11:21
问题 Does MVC have a built in way to specify a CDN fallback for style sheets? I am trying to set up a fallback for the jQuery Mobile Structure style sheet. Here is my code in the RegisterBundles method: var JQMstyleSheet = new StyleBundle("~/JQMstyle", "http://code.jquery.com/mobile/1.3.1/jquery.mobile.structure-1.3.1.min.css").Include("~/theme/jquery.mobile.structure-1.3.1.css"); JQMstyleSheet.CdnFallbackExpression = "window.jQuery.mobile"; bundles.Add(JQMstyleSheet); When the page renders it

Prevent bundle from responding if cache buster doesn't match content

拟墨画扇 提交于 2020-01-31 04:22:25
问题 I'm using Bundling and Minification across a server farm where there is a cross-over period of old and new servers. The issue I have is that the old servers are caching the content of the new bundle cache buster URL. For example the new HTML is cached with the new bundle URL: <script src="/bundle.css?v=RBgbF6A6cUEuJSPaiaHhywGqT7eH1aP8JvAYFgKh"></script> This then makes a request to an old server which hasn't yet been updated with the new CSS code and this then cached. Any subsequent calls to