Passing clean-css options doesn't work
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 38/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript
- 领域
- build-system
调研方向
首先,使用 --environment production 复现 Ember CLI 项目的构建过程,并跟踪 minifyCSS 选项如何传递给 clean-css。将嵌套的 level 配置与 clean-css 的优化文档进行比较;当构建遵循所请求的每项优化设置,且生成的 CSS 反映这些设置时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
We recently updated all the packages and dependencies in our Ember.js project to their latest versions. Since then when this project is built with the --environment production flag, the CSS looks broken when browsing through its web pages. Disabling the CSS minifying fixes the issue.
I am trying to investigate and find out which CSS optimization is breaking our CSS styles, but it doesn't look like passing custom clean-css options is working correctly:
enabled works:
minifyCSS: {
enabled: true // or false
}
level (integer) works:
minifyCSS: {
options: {
level: 1 // 0, 1 or 2
}
}
level (with options) doesn't work:
minifyCSS: {
options: {
level: {
1: {
all: false,
optimizeFont: true
},
2: {
all: false
}
}
}
}
Passing the last options above does not have the desired result, which would be to only have optimizeFont enabled and all other optimizations disabled. The final CSS minifying looks the same as if everything was enabled.
The clean-css documentation says that we should be able to individually enable or disable each optimization (https://github.com/clean-css/clean-css?tab=readme-ov-file#level-0-optimizations) but I haven't encountered a single example of such a thing being done in Ember.js or in ember-cli-clean-css.
- 主要语言
- JavaScript
- 星标
- 6
- 派生
- 5
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
mksglu/context-mode#1200 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
neondatabase/website#5944 ·
-
module: core
难度 2/5 1-3 小时 新手友好度 75/100
bigbluebutton/bigbluebutton#25849 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
jaegertracing/jaeger-ui#4506 ·