bunchee
bunchee copied to clipboard
Should clear the whole dist folder
bunchee will clean folders like ./dist/es
, /dist/cjs
but not ./dist/test.ts
if you create one.
Ideally the ./dist
folder should be removed to avoid bad files are included
Should we clear the common top-level directory for all exports?
If someone wants bundle files to public
directory, and there are some assets files that should keep. How do we know if the root dist
folder needs to be removed?
{
"exports": {
".": {
"import": "./public/js/index.mjs",
"require": "./public/js/index.cjs",
}
}
}
- public
- assets
- icon.svg
- js ( in gitignore)
- index.cjs
- index.mjs
We can clean the 1st common directory:
For this case:
"import": "./public/js/index.mjs",
"require": "./public/js/index.cjs",
We can clean ./public/js
directory