Reputation: 2728
I would like to clarify results of webpack bundle analyzer for my NUXT project.
CitySelector component is being used multiple times on different nuxt pages. Basic import:
import CitySelector from "~/components/CitySelector.vue"
export default {
components: {
CitySelector
},
After checking webpack bundle analyzer results I see multiple blocks with CitySelector:
I guess bundle size is too big because of wrong use of reusable component. Please advise whether my interpretation of the analyzer results is right? Can bundle size be optimized in such case?
Upvotes: 1
Views: 719
Reputation: 17621
You should use Nuxt 2.4 and it will be handled automatically and there won't be repeated pieces of code like on screenshot
Upvotes: 3