nuxt-community / vuetify-module

Vuetify Module for Nuxt 2
Other
627 stars 106 forks source link

Treeshaking static deployment #444

Open charlie17 opened 3 years ago

charlie17 commented 3 years ago

Module version 1.11.3

Describe the bug Treeshaking seems to not be functioning when deployment target is static

To Reproduce

  1. Run create nuxt-app, select Vuetify as UI framework, select Universal rendering mode, select Static deployment target, skip all other options
  2. Run yarn generate - resulting dist folder is 1.47MB in size (yarn build --analyze reveals 627k of that is Vuetify)
  3. Add treeShake: true to Vuetify block of nuxt.config.js - no difference
  4. View page source on default pages (index.html, inspire/index.html) are chock full of css - this must not be treeshaken?
  5. Applying this hack cuts things down to size - seeming to further demonstrate built-in treeshaking is not working?

Expected behavior Treeshaking to function as expected

cprcrack commented 3 years ago

Same issue. This is also confirmed by https://stackoverflow.com/questions/60022986/smallest-possible-vuetify-css-js-size-0-5mb