Skip to content

Use of eval in "node_modules/jimp/dist/browser/index.js" is strongly discouraged as it poses security risks and may cause issues with minification. #1355

Open
@rallets

Description

@rallets

Expected Behavior

Vite can build using Rollup without warnings.

Current Behavior

Rollup is warning about eval usage.

node_modules/jimp/dist/browser/index.js (13:32539): Use of eval in "node_modules/jimp/dist/browser/index.js" is strongly discouraged as it poses security risks and may cause issues with minification.
  • Jimp Version: 1.6.0
  • Operating System: Windows 11
  • Node version: 20.17.0

Context

I'm using a very small subset of what Jimp can do, Jimp.read, resize, ResizeStrategy, getBuffer.
Is it possible somehow to import only what's needed to try to avoid the eval ?

Rollup reference: https://rollupjs.org/troubleshooting/#avoiding-eval
Vite reference: vitejs/vite#12103

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions