bunchee icon indicating copy to clipboard operation
bunchee copied to clipboard

Should clear the whole dist folder

Open huozhi opened this issue 11 months ago • 3 comments

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

huozhi avatar Mar 11 '24 00:03 huozhi

Should we clear the common top-level directory for all exports?

hyoban avatar Apr 06 '24 04:04 hyoban

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

nnecec avatar Apr 24 '24 07:04 nnecec

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

huozhi avatar Apr 26 '24 20:04 huozhi