Open numfin opened 3 weeks ago
After beating my head for a while i found "solution" which was working for me:
vite.config.ts
export default defineConfig(({command}) => ({
base: command === "build" ? join("/@fs", __dirname, "dist") : "/",
Ok this "solution" worked only in devserver so manual file copying with vite-plugin-static-copy fixed it for me:
viteStaticCopy({
targets: [{ src: 'relative_path_to_package/dist/assets/*.svg', dest: './assets/' }],
})
Vite
I have 2 projects:
After investigating - I found that app inserting
/assets/spritemap...
which is correct path inside component library dist folder, but my main app doesn't know anything about/assets/spritemap...
.So I'm wondering what kind of magic I have to do to tell vite to dynamically insert spritemap path into xlink-href.
Shortly
Now:
localhost:5173/assets/spritemap.svg
I want:localhost:5173/@fs/path_to_uikit/dist/assets/spritemap.svg