【问题标题】:Update minified CSS in ASP.NET Core on OS X在 OS X 上更新 ASP.NET Core 中的缩小 CSS
【发布时间】:2017-05-10 14:04:47
【问题描述】:

我有一个基于默认模板构建的简单 ASP.NET Core 站点。 我需要更新 site.min.css,因为 site.css 已经更新。

这是在 Jetbrains Rider 的 OS X 上。 MSDN 文档说(在 Windows 上!)只需重建项目即可更新缩小的文件。

bundleconfig.json 文件没有改变:

// Configure bundling and minification for the project.
// More info at https://go.microsoft.com/fwlink/?LinkId=808241
[
  {
    "outputFileName": "wwwroot/css/site.min.css",
    // An array of relative input file paths. Globbing patterns supported
    "inputFiles": [
      "wwwroot/css/site.css"
    ]
  },
  {
    "outputFileName": "wwwroot/js/site.min.js",
    "inputFiles": [
      "wwwroot/js/site.js"
    ],
    // Optionally specify minification options
    "minify": {
      "enabled": true,
      "renameLocals": true
    },
    // Optionally generate .map file
    "sourceMap": false
  }
]

如何从 IDE 或 CLI(命令行界面)更新缩小的文件?

【问题讨论】:

    标签: css asp.net-core updates bundling-and-minification rider


    【解决方案1】:

    抱歉,耽搁了很长时间。我正在为会议做准备。要解决您的问题,只需在您的 csproj 文件中添加:<PackageReference Include="BuildBundlerMinifier" Version="2.4.337" />。并且您的捆绑文件将在构建后更新。

    【讨论】:

      猜你喜欢
      • 2012-04-23
      • 1970-01-01
      • 1970-01-01
      • 2018-10-07
      • 2013-02-17
      • 1970-01-01
      • 2015-05-16
      • 1970-01-01
      相关资源
      最近更新 更多