ZachJW34 / nx-plus

Collection of Nx Community Plugins
MIT License
302 stars 51 forks source link

Setup for Vuetify 2 in webpack? #257

Open gregveres opened 2 years ago

gregveres commented 2 years ago

I have been converting my app to a monorepo for the last while, trying to figure out the right way to decompose the app into libraries to support breaking the app into 4 micro front ends. I thought I was on a good path until I looked at the size of the bundles that are being created. My initial app bundle is about 5x the size of the original app bundle before using Nx. But that is a question for another discussion.

I am noticing that my vendor chunk is about double the size of the pre-nx vendor chunk. I think I have narrowed it down to vuetify doubling in size. It doubled in size becuase I only use about half of the components. In the pre-nx version, I am using the vuetify plugin that properly configures webpack to pull out only the components that I use.

Has anyone figured out how to include the vuetify loader so that it properly prunes the components that you don't use?

ZachJW34 commented 2 years ago

Have you tried modifying the webpack confit via configure-webpack.js? You should be able to push any loaders or plugins you want, including the vuetify ones