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.
Apparently the order in which you define the
development
andproduction
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, thenindex.development.mjs
will point tocore.production.mjs
.Repro: https://github.com/amannn/bunchee-test/commit/cc17248169a77d1e8babcd24a7fe9105454f845e
Listing
production
first is unfortunately not a viable workaround, as in this casedist/index.production.mjs
will point tocore.development.mjs
.