Skip to content
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

All locales and plugins are bundled in consuming apps #457

Open
bartocc opened this issue Jun 12, 2023 · 5 comments
Open

All locales and plugins are bundled in consuming apps #457

bartocc opened this issue Jun 12, 2023 · 5 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@bartocc
Copy link

bartocc commented Jun 12, 2023

Starting with 0.11.0 (the embroider v2 version of this addon), all dayjs locales and plugins end up in the final bundle

See my comments here: e4f8ca4#r117661519

@sinankeskin
Copy link
Owner

v0.12.1 has been released. Should be ok now. Could you please check?

@bartocc
Copy link
Author

bartocc commented Jun 13, 2023

unfortunately, 0.12.1 does not solve the issue. I really believe the template string dayjs/locale/${locale}.js is the culprit here

@sinankeskin
Copy link
Owner

Yeap I see all locales still bundling. I'll investigate but as far as I know there is no sync way to import yet.

If you have any solution feel free to create a PR.

Thanks for the report.

@bartocc
Copy link
Author

bartocc commented Jun 13, 2023

Maybe a solution would be to have this addon only provide helpers.
The dayjs lib, locales and plugins inclusions would be the responsibility of the consuming apps.

If I remember correctly, ember-moment did the same when they realized that the moment library was bundled twice

@sinankeskin sinankeskin added the bug Something isn't working label Jan 9, 2024
@sinankeskin sinankeskin self-assigned this Jan 9, 2024
@sinankeskin sinankeskin added the enhancement New feature or request label Jan 9, 2024
@sinankeskin
Copy link
Owner

Maybe a solution would be to have this addon only provide helpers. The dayjs lib, locales and plugins inclusions would be the responsibility of the consuming apps.

If I remember correctly, ember-moment did the same when they realized that the moment library was bundled twice

@bartocc I think that's the only way to fix this properly. I'll try to create a new major version exactly like that when I get some free time. Thanks for the suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants