Open abcfy2 opened 3 months ago
If I'm understanding you correctly, aren't you asking for this? https://tsup.egoist.dev/#copy-files-to-output-directory
If I'm understanding you correctly, aren't you asking for this? https://tsup.egoist.dev/#copy-files-to-output-directory
Not just for this. @vercel/ncc
could fix the path.join
after assets copy.
For example. Here's the project structure:
.
`-- src
`-- index.ts
`-- public
`-- myimg.png
In the index.ts
:
const pngFile = path.join(__dirname, '../public/myimg.png');
// ... SNIP ...
After use @vercel/ncc
build, src/index.ts
could be compile to dist/index.js
, and public/myimg.png
could copy to dist/myimg.png
, and path.join
should be correct after copy assets. But Copy files to output directory
does not solve the path
after copy.
So @vercel/ncc
call this Asset Relocation
.
In @vercel/ncc
, if you use process.cwd()
, __filename
, __dirname
, path.*()
, require.resolve
, the related files should be also copy to dist, and auto correct the path.
Could you please support asset relocation feature like
@vercel/ncc
? https://github.com/vercel/webpack-asset-relocator-loader#how-it-works@vercel/ncc
could supportpath.join()
asset been copied to dist directory. Would you please also support this feature ?Thanks.
Upvote & Fund