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

Fingerprint does not update when content changed after webpack update

Đang mở
#323 0 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
35/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 so sánh thứ tự thông tin trong package.json của ember-cli-terser với thứ tự được tham chiếu của ember-cli-sri và broccoli-asset-rev. Tái hiện một build trong đó webpack thay đổi nội dung của vendor-${fingerprint}.js, sau đó xác minh rằng fingerprint và giá trị integrity được tạo từ nội dung cuối cùng và reproduction hiện có không còn thất bại.

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

Mô tả

We had an incident after updating webpack. Turns out that the webpack update changed the content of vendor-${fingerprint}.js but did not update the fingerprint. We also use ember-cli-sri that adds integrity SHA in index.html which correctly updated. Users opening the site in a new tab got the new index.html with the right integrity SHA and the browsers served the old vendor-1234.js from cache. That resulted in the following error:

Failed to find a valid digest in the 'integrity' attribute for resource
'https://example.com/assets/vendor-1234.js' with computed SHA-512 integrity '03...Ugg=='.
The reosuce has been blocked.

Somehow the order seems to be wrong and the fingerprinting should run after webpack finished its work.

I first thought that renaming this addon from ember-cli-uglify to ember-cli-terser in https://github.com/ember-cli/ember-cli-terser/pull/230 caused it because ember-cli-sri still refers to ember-cli-uglify here. Then I saw that this addon has its own order infos here introduced in https://github.com/ember-cli/ember-cli-terser/pull/266.

If broccoli-asset-rev does the fingerprinting this addon should run before broccoli-asset-rev also mentioned in https://github.com/ember-cli/ember-cli-terser/pull/298

Is the only solution to fix this, to pin ember-cli-terser to 4.0.1?

Edit: Pinning ember-cli-terser to 4.0.1 will not work because it's missing "before": "ember-cli-sri", 😞
Edit: I found the same issue for ember-cli-autoprefixer with the expected fix.

@NullVoxPopuli @mike-engel

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

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 khác của ember-cli/ember-cli-terser

Tất cả issue của ember-cli/ember-cli-terser

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.