Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should clear the whole dist folder #485

Open
huozhi opened this issue Mar 11, 2024 · 3 comments
Open

Should clear the whole dist folder #485

huozhi opened this issue Mar 11, 2024 · 3 comments
Labels
area:bug Something isn't working

Comments

@huozhi
Copy link
Owner

huozhi commented Mar 11, 2024

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 huozhi added the area:bug Something isn't working label Mar 11, 2024
@huozhi huozhi added this to the v5 milestone Mar 11, 2024
@huozhi huozhi removed this from the v5 milestone Mar 20, 2024
@hyoban
Copy link
Contributor

hyoban commented Apr 6, 2024

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

@nnecec
Copy link
Contributor

nnecec commented Apr 24, 2024

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

@huozhi
Copy link
Owner Author

huozhi commented Apr 26, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants