jimp-dev / jimp-dev/jimp

bug: A warning will appear when building with vite `[plugin vite:resolve] Module "util" has been externalized for browser compatibility`.

Open
#1,379 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
14.7k
Forks
777
PR merge metrics
No merged PRs in 30d

Description

# Expected Behavior

The build is normal, and there should be no warnings.

# Current Behavior

Currently, the following warning appears when using vite for building.

```js
[plugin:vite:resolve] [plugin vite:resolve] Module "util" has been externalized for browser compatibility, imported by "/node_modules/.pnpm/pngjs@7.0.0/node_modules/pngjs/lib/png.js". See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
```

# Failure Information (for bugs)

It seems to be a problem with the upstream pngjs, but I will report it here as well. https://github.com/pngjs/pngjs/issues/288

## Steps to Reproduce

https://stackblitz.com/edit/vitejs-vite-g1cyszx3?file=src%2FApp.tsx

**Screenshots**

Image

## Context

- Jimp Version: ^1.6.0
- Operating System: Mac
- Node version: v18.20.3

## Failure Logs

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.