Closed MBehtemam closed 1 week ago
Hi , I have two fonts in my asset directory. Here is how I imported them in the theme.ts
import FoundryBook from "../assets/fonts/Font1.woff"; import FoundryBold from "../assets/fonts/Font2.woff";
And here is part of my config in vite.config :
libAssetsPlugin({ limit: 1024 * 8, include: [/.*\.woff2?/g] })
But after building the library here is the output :
import M from "../assets/d572caf5b8dff4d1.woff"; import q from "./assets/21c7c48146cd70bf.woff";
Which cause this issue :
` ➜ press h to show help X [ERROR] Could not resolve "./assets/21c7c48146cd70bf.woff"
node_modules/@mylib/core-components/dist/theme/index.js:2:14: 2 │ import m from "./assets/21c7c48146cd70bf.woff"; ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `
Please let me know if you need more information .
I commented the include part and surprisingly it is working.
@MBehtemam Thanks for your feedback, and can you provide a minimal reproducible version?
Hi , I have two fonts in my asset directory. Here is how I imported them in the theme.ts
And here is part of my config in vite.config :
But after building the library here is the output :
import M from "../assets/d572caf5b8dff4d1.woff"; import q from "./assets/21c7c48146cd70bf.woff";
Which cause this issue :
` ➜ press h to show help X [ERROR] Could not resolve "./assets/21c7c48146cd70bf.woff"
Please let me know if you need more information .