Are the .min of versions files used when `BundleTable.EnableOptimizations = true`?

后端 未结 1 1184
花落未央
花落未央 2021-02-19 23:03

Does specifying BundleTable.EnableOptimizations = true minify all CSS and JS files in a bundle, or are the available min

1条回答
  •  南方客
    南方客 (楼主)
    2021-02-19 23:24

    One has nothing to do with the other. BundleTable.EnableOptimizations exists merely to provide a way to force bundling in development, where it's disabled by default. In production, it's enabled by default, and unnecessary to specify anything for EnableOptimizations. Either way, though, it only determines whether bundling will happen or not, not how it will occur or what will happen as a result.

    That said, the standard behavior is to bundle but not minify anything that has a companion file with in the form of [filename].min.[ext]. It will simply take the minified source file and dump its content into the bundle. If there is no companion file, then the original file will be minified first before bundling.

    0 讨论(0)
提交回复
热议问题