Open niuiic opened 2 weeks ago
For an example, you can check this project.
packages/webgl/src/components/snow/index.ts
import snowflakeUrl from '@/assets/images/snowflake.png'
snowflakeUrl may be transformed to '/snowflake.hash.png', which is definitely wrong when use this library in another project.
snowflakeUrl
Thus, I have to import assets inline, but it slows down the prebuild for the project using this library.
@laynezh/vite-plugin-lib-assets is an awesome solution for vite, but does not seem to work with farm.
@laynezh/vite-plugin-lib-assets
No response
x
System: OS: Linux 6.9 Arch Linux CPU: (16) x64 AMD Ryzen 7 5800H with Radeon Graphics Memory: 9.98 GB / 15.58 GB Container: Yes Shell: 5.9 - /bin/zsh Binaries: Node: 22.2.0 - /run/user/1000/fnm_multishells/4278_1718689209819/bin/node Yarn: 1.22.22 - /usr/bin/yarn npm: 10.7.0 - /run/user/1000/fnm_multishells/4278_1718689209819/bin/npm pnpm: 9.4.0 - /run/user/1000/fnm_multishells/4278_1718689209819/bin/pnpm npmPackages: @farmfe/core: ^1.1.15 => 1.1.15
I'll take a look
Steps to reproduce
For an example, you can check this project.
packages/webgl/src/components/snow/index.ts
snowflakeUrl
may be transformed to '/snowflake.hash.png', which is definitely wrong when use this library in another project.Thus, I have to import assets inline, but it slows down the prebuild for the project using this library.
@laynezh/vite-plugin-lib-assets
is an awesome solution for vite, but does not seem to work with farm.Reproduce link
No response
What is actually happening?
x
System Info