-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Converted moment, moment range, and Vue to peer dependencies #164
base: master
Are you sure you want to change the base?
Conversation
… to reduce package size.
hey guys!I want to ask you a question that sounds like a novice, but I've never used it. |
@lw66666 I don't believe there is a way to do it with a command. The way I went about it is to do |
@spgoad Thank you. |
I think this is a great idea, as keeping the bundle size down would be very welcome. I'm not sure how you tackle existing installations, but think this is definitely worth considering. |
I'd like this PR to be merged, although it would need to be released as v3.0 as it's a breaking change. |
Thank you for taking the time making this PR. Indeed, removing those dependencies would be very nice for the bundle. Yet as said by @m-mohr it may break current versions. I'll do some researching in the following days to tackle this issue. I'll keep you updated. |
Hey! What is the reason to not merge this PR ? It looks good to me Thanks |
I'd love to see this PR merged. My bundle jumped from 159KiB to 547KiB by including this package (JS only, excludes the CSS). I wish I would have known about this when choosing which date picker to choose. |
Yeah, I think we are going to switch date pickers, too. The size can't be justified any longer... |
I switched to https://element.eleme.io/#/en-US/component/datetime-picker#datetimepicker The api is better too imo |
I've migrated to https://github.com/mengxiong10/vue2-datepicker, which gives me a much better experience overall. |
I did the same, also very happy now |
This somewhat relates to issue #116 and package size as this was discussed as a possible approach for solving that problem as well.
We we're working on our first deployment using the vue-ctk-date-time-picker, and I noticed our chunk-vendors.js compiled by Webpack was pretty big. After digging into it, I discovered that this package was importing moment, vue, and moment range as npm dependencies, which means they are included in the final dist js files. This would be ok, except our app also has moment and vue as dependencies - which means we've now included them in our final package twice by including the dist version of vue-ctk-date-picker.
This PR converts VueJS, Moment, & Moment-Range to peer dependencies which allows us to only include each of them one in our application. This would be a somewhat significant change as anyone who upgrades would need to install the 3 dependencies themselves - so I welcome feedback on the approach and how that would need to be communicated in docs.