altai-ui / qui-max

A Vue 3.x Neumorphic design system for Web. Written in TypeScript with Composition API 🔥
https://quimax.dev
MIT License
277 stars 30 forks source link

feat: make components treeshakeable #276

Closed ViZhe closed 2 years ago

ViZhe commented 2 years ago

partially fix #274 and fix #86

For some reason, the code of external packages(date-fns, object-hash and etc) still in final bundle even if you don't use QDatapicker or QTable. I assume this can be possible resolved by marking them as peerDeps, but i doubt that this is the best decision, so this situation requires further separated investigation.

netlify[bot] commented 2 years ago

Deploy Preview for qui-docs canceled.

Name Link
Latest commit f59c7a719cd8dbd06a27551899630d82a04561ec
Latest deploy log https://app.netlify.com/sites/qui-docs/deploys/62668dfba8ed380009b851eb
netlify[bot] commented 2 years ago

Deploy Preview for qui-max ready!

Name Link
Latest commit f59c7a719cd8dbd06a27551899630d82a04561ec
Latest deploy log https://app.netlify.com/sites/qui-max/deploys/62668dfbb39f100008016774
Deploy Preview https://deploy-preview-276--qui-max.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

ViZhe commented 2 years ago

should be rebased after https://github.com/Qvant-lab/qui-max/pull/275

ckvv commented 2 years ago

partially fix #274 and fix #86

For some reason, the code of external packages(date-fns, object-hash and etc) still in final bundle even if you don't use QDatapicker or QTable. I assume this can be possible resolved by marking them as peerDeps, but i doubt that this is the best decision, so this situation requires further separated investigation.

Maybe export with original module name via preserveModules: true. is the best decision.

截屏2022-04-28 18 40 12

https://rollupjs.org/guide/en/#outputpreservemodules

ViZhe commented 2 years ago

partially fix #274 and fix #86 For some reason, the code of external packages(date-fns, object-hash and etc) still in final bundle even if you don't use QDatapicker or QTable. I assume this can be possible resolved by marking them as peerDeps, but i doubt that this is the best decision, so this situation requires further separated investigation.

Maybe export with original module name via preserveModules: true. is the best decision. 截屏2022-04-28 18 40 12

https://rollupjs.org/guide/en/#outputpreservemodules

oy, it seems like my purerage was a bit too much ;) thank for the tip with preserveModules it's really more shakeable, though external deps are now in dist. I dont think it's that bad, at least for a step, anyway project needs some structural and build changes so we continue work on it.

https://github.com/Qvant-lab/qui-max/pull/281