farm-fe / farm

Extremely fast Vite-compatible web build tool written in Rust
https://farmfe.org
MIT License
4.56k stars 154 forks source link

[Bug Report]: Farm unable to use `unplugin-imagemin` #1549

Closed fu050409 closed 5 days ago

fu050409 commented 1 week ago

Steps to reproduce

  1. Setup a farm project and configure unplugin-imagemin.

  2. Run pnpm build

Reproduce link

https://github.com/fu050409/farm-imagemin-example

What is actually happening?

Failed to build by farm:

image

But build properly by vite:

image

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (20) x64 13th Gen Intel(R) Core(TM) i9-13900H
    Memory: 3.48 GB / 15.64 GB
  Binaries:
    Node: 21.6.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.22 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 10.2.4 - C:\Program Files\nodejs\npm.CMD
    pnpm: 9.4.0 - ~\AppData\Local\pnpm\pnpm.CMD
    bun: 1.0.31 - ~\.bun\bin\bun.EXE
  Browsers:
    Edge: Chromium (126.0.2592.87)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    @farmfe/core: ^1.2.8 => 1.2.8
ErKeLost commented 1 week ago

unplugin-imagemin not support farm by now,I probably wonโ€™t consider supporting farm in the future, because itโ€™s quite hacky. we can think about implacement write with rust plugin ๐Ÿ˜†๐Ÿ˜†๐Ÿ˜† , If you would like to contribute you are more than welcome