I am trying to build a library and i am getting incorrect bundle size and i cannot seems to find material about this on the internet or chatgpt.
When i use default config
export default defineConfig({
plugins: [react()],
});
I get small bundle size.
when i do
export default defineConfig({
plugins: [react()],
build: {
reportCompressedSize: true,
lib: {
entry: resolve(__dirname, "src/lib.ts"),
name: "lib",
fileName: (format) => `lib.${format}.js`,
},
}
});
I am getting almost 5 times larger bundle size and i cannot find logical explanation in the docs?
Could someone enlighten me please why this happens ?