ncc
ncc copied to clipboard
import.meta.url stays original after compilation, how to get compiled file path
Let's suppose a file located at /<packagerootdir>/lib/xyz/someaction.js. After compilation I place the resulting file in e.g. /app/dist/index.js. The someaction.js used import.meta.url to find it's location. And it was working well in the uncompiled code. But for the compiled import.meta.url returns /app/lib/xyz/someaction.js. So:
- This is incorrect because
/app/lib/xyz/someaction.jsdoes not exist - This is incorrect because the
index.jsis actually in/app/dist... anddistpart is missing in the resulting path anyway - Finally it is not clear how to get compiled
index.jspath properly.
Sounds like #897 will fix this
Looks promising indeed, thanks ! Will follow that PR.