I am importing a absolute path in some files of my repo and try to bundle it with rollup My import where /api/ is absolute path:
import * from '/api/myFile.js'
But when I bundle it, rollup changes it to relative path and it looks like:
import * from from '../../../../api/myFile.js'
And the above path doesn't exist in my app :(
My rollup config:
rollup src\\input.js -o lib\\bundle.js -f esm --inlineDynamicImports=true
Please help me resolve this issue
I tried making '/api/'
path as external, that didn't change anything.
And i tried using few rollup plugins - includepaths, root-import,etc nothing worked