Hi,
Just took a look at my final bundle composition and here it is:

In my case I would like to just keep 1-2 locales, without bringing all others in the deployment.
What's your recommended way to do so?
Thank you,
Can you show how you're importing Uppy? I don't think all the locales should be included by Uppy unless there is a bug.
If you only want a couple you can do:
import fr_FR from '@uppy/locales/lib/fr_FR'
and you should only get the french one.
Oh my bad!
I took a part of a Uppy Vue component on GitHub and they were doing something like:
protected getLocale(): string | null {
let lang = null;
if (this.locale) {
lang = require(`@uppy/locales/lib/${this.locale}`);
}
return lang;
}
So this import is at runtime... so I guess without knowing the value during compilation, webpack brings everything into the bundle. Replacing by a "static" import outside component as you mentioned solved the problem.
Thank you @goto-bus-stop!