In my project, during dev everything works great but my target app seems to not parse imports that start with "/" properly ( I am developing for a local app, not for a website / webapp).
How can I get Vite to ommit the /
at the beginning of import statements only when building?
For example, if I have a file in my public
folder that I import like so:
import something from '/file.svg
I need it to bundle as:
import something from 'assets/file.svg
But instead I am getting:
import something from '/assets/file.svg
I have tried modifying vite.config.js
to include any of the following:
base: ''
,base: '/'
,base: './'
,