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

Production build overriding development build #548

Closed
Tracked by #1115
amannn opened this issue Jun 13, 2024 · 1 comment · Fixed by #553
Closed
Tracked by #1115

Production build overriding development build #548

amannn opened this issue Jun 13, 2024 · 1 comment · Fixed by #553
Labels
area:bug Something isn't working

Comments

@amannn
Copy link

amannn commented Jun 13, 2024

Apparently the order in which you define the development and production conditions has an effect on the resulting bundle. If you have a library with multiple entry points, let's say:

  • ./
  • ./core
  • ./react

… where ./ re-exports from the sub pacakges, then index.development.mjs will point to core.production.mjs.

Repro: amannn/bunchee-test@cc17248

// dist/index.development.mjs
export * from './core.production.mjs';
export * from './react.production.mjs';

Listing production first is unfortunately not a viable workaround, as in this case dist/index.production.mjs will point to core.development.mjs.

@huozhi
Copy link
Owner

huozhi commented Jun 19, 2024

This is a very interesting bug 👀

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

Successfully merging a pull request may close this issue.

2 participants