Kong / Kong/httpsnippet

does not work with vite

Đang mở
#329 4 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
1.2k
Fork
242
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

It throws error as `global is not defined`
```txt
Error: global is not defined
at node_modules/.pnpm/event-stream@3.3.4/node_modules/event-stream/index.js (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/httpsnippet_src_index.js?v=8be32947:2722:23)
at __require (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/chunk-5WWUZCGV.js?v=8be32947:8:50)
at node_modules/.pnpm/httpsnippet@2.0.0_mkdirp@1.0.4/node_modules/httpsnippet/src/index.js (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/httpsnippet_src_index.js?v=8be32947:10392:14)
at __require (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/chunk-5WWUZCGV.js?v=8be32947:8:50)
at http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/httpsnippet_src_index.js?v=8be32947:10614:16
```

which is because of the library `event-stream` is not a browser compatible lib?

Using version: 3.0.1
vite: 4.4.9

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

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

Hướng nghiên cứu

Start by tracing the event-stream dependency shown in the stack trace and its import from httpsnippet/src/index.js under a Vite browser build. Confirm the failure with the reported Vite 4.4.9 setup; done means the package builds and runs in the browser without the global-is-not-defined error.

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

Đánh giá

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

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.