Put Moment.js as an optional dependency #311

Open
josemanuelp opened this Issue Jan 10, 2017 · 4 comments

Projects

None yet

3 participants

@josemanuelp

Hi.

Congratulations on this great work.

I wonder if it's possible to put moment.js as an optional dependency when not using datetime components.

Moment.js is huge!

Index of /min/

Name	Type	Size	Last Modified
..	-	-	-
locales.js	application/javascript	303 kB	2016-12-04T05:48:31.000Z
locales.min.js	application/javascript	194 kB	2016-12-04T05:48:31.000Z
moment-with-locales.js	application/javascript	426 kB	2016-12-04T05:48:31.000Z
moment-with-locales.min.js	application/javascript	255 kB	2016-12-04T05:48:31.000Z
moment.min.js	application/javascript	61.3 kB	2016-12-04T05:48:31.000Z

Or at least find a way to select certain locations. I think in this way the footprint of QuasarFramework is going to be much less.

Thanks.

@josemanuelp josemanuelp changed the title from Put Moment.js optional to [proposal] Put Moment.js as an optional dependency Jan 10, 2017
@josemanuelp josemanuelp changed the title from [proposal] Put Moment.js as an optional dependency to [Proposal] Put Moment.js as an optional dependency Jan 10, 2017
@rstoenescu
Collaborator

In /build/weback.base.conf.js there's a section specifically for this:

/* Uncomment if you wish to load only one Moment locale: */
// new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /en/),

Will do something about this, yeah. This is part of the roadmap (import only needed components). Thanks!

@smolinari
Collaborator

How hard would it be to make the single locale selection dynamic?

Scott

@rstoenescu
Collaborator

@smolinari Due to how Momentjs is built: extremely hacky

@smolinari
Collaborator

Hmm.....interesting.

Scott

@rstoenescu rstoenescu changed the title from [Proposal] Put Moment.js as an optional dependency to Put Moment.js as an optional dependency Jan 10, 2017
@rstoenescu rstoenescu added this to the v0.13 milestone Jan 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment