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

Loading 3rd party scripts for unused widget

Đang mở
#882 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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
55/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
docker, gitlab, node.js, nuxt, typescript
Lĩnh vực
build-system, devops

Hướng nghiên cứu

Theo dõi lỗi của bundler-transformer qua dist/module.mjs, đặc biệt là downloadScript, và kiểm tra entry không được sử dụng dist/runtime/components/ScriptCalendlyInlineWidget.vue xuất hiện trong đầu ra build. Tái hiện lỗi bằng npm run build trong môi trường mạng bị hạn chế. Được xem là hoàn tất khi các widget không được sử dụng không kích hoạt việc tải xuống từ bên thứ ba, trong khi các widget được tham chiếu vẫn tải các script của chúng.

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

Mô tả

harlan-agent-wait-to-implement

I run into an issue where loading a 3rd party widget fails in Gitlab job where the access to the internet is limited. The script that fails if used by a widget that is not used in the app at all. Would it be possible to not even load the 3rd party scripts if they are not referenced by the solution?

System:
@nuxt/scripts: 1.3.6
docker build in Gitlab actions
node:22.23.2

Here is the build output:

[@nuxt/scripts] ℹ Downloading script https://secure.gravatar.com/js/gprofiles.js → d1133547e8a1f280.js (21.38 kB br)
✓ 4471 modules transformed.

 ERROR  ✗ Build failed in 15.01s

│
■  Nuxt build error: Error: Build failed with 1 error:
│
│  [plugin nuxt:scripts:bundler-transformer] /src/src/MySolution/node_modules/@nuxt/scripts/dist/runtime/components/ScriptCalendlyInlineWidget.vue
│  FetchError: [GET] "https://assets.calendly.com/assets/external/widget.js": <no response> fetch failed
│      at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
│      at async $fetchRaw2 (file:///src/src/MySolution/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs:286:14)
│      at async $fetchRaw2 (file:///src/src/MySolution/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs:286:14)
│      at async $fetch2.$fetchRaw2 [as raw] (file:///src/src/MySolution/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs:286:14)
│      at async downloadScript (file:///src/src/MySolution/node_modules/@nuxt/scripts/dist/module.mjs:1137:11)
│      at async file:///src/src/MySolution/node_modules/@nuxt/scripts/dist/module.mjs:1382:40
│      at async TransformPluginContextImpl.handler (file:///src/src/MySolution/node_modules/@nuxt/scripts/dist/module.mjs:1451:13)
│      at async plugin (file:///src/src/MySolution/node_modules/rolldown/dist/shared/bindingify-input-options-COG1sboO.mjs:1537:16)
│      at async plugin.<computed> (file:///src/src/MySolution/node_modules/rolldown/dist/shared/bindingify-input-options-COG1sboO.mjs:2125:12)
│  Caused by:
│    TypeError: fetch failed
│    Caused by:
│      Error: read ECONNRESET
│          at TLSWrap.onStreamRead (node:internal/stream_base_commons:216:20)
ERROR: process "/bin/sh -c npm run build" did not complete successfully: exit code: 1
Ngôn ngữ chính
TypeScript
Star
584
Fork
91
Merge trung bình
1 ngày 36 phút
Pull request đã merge (30 ngày)
29

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 khác của nuxt/scripts

Tất cả issue của nuxt/scripts

Issue tương tự

Thêm issue về TypeScript

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.