css - 更新 OS X 上 ASP.NET Core 中的缩小 CSS

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

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

这是在 OS X 上的 Jetbrains Rider 中。 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(命令行界面)更新缩小文件?

最佳答案

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

关于css - 更新 OS X 上 ASP.NET Core 中的缩小 CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43894847/

相关文章:

asp.net-core - Azure 函数 : host error has occurred during startup operation Could not load file

html css 对齐div中的元素

razor - 复杂的自定义标签助手

c# - claim 类型不正确

c# - 部分更新elastic search NEST 2.x

sql-server - 如何使用 N 在 SQL Server 中插入多语言数据?

vaadin - 如何更新 CrudPanel 中的项目

html - 背景比 iframe 大

html - 将 <li> 放在 <a> 中时出现 Firefox 语法问题 - 不可链接?

css - 更改 Bootstrap Carousel 淡入淡出过渡