Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Passing clean-css options doesn't work

Đang mở
#306 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
38/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
javascript
Lĩnh vực
build-system

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện quá trình build dự án Ember CLI với --environment production và theo dõi cách các tùy chọn minifyCSS được truyền vào clean-css. So sánh cấu hình level lồng nhau với tài liệu về tối ưu hóa của clean-css; được xem là hoàn tất khi build tuân theo các thiết lập được yêu cầu cho từng tối ưu hóa và CSS tạo ra phản ánh các thiết lập đó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
JavaScript
Star
6
Fork
5
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.