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

Unnecessary .js includes #2183

Open
friedelwolff opened this issue Nov 30, 2015 · 3 comments
Open

Unnecessary .js includes #2183

friedelwolff opened this issue Nov 30, 2015 · 3 comments

Comments

@friedelwolff
Copy link

I see all translations of moment.js is included in my .js bundle. Is it possible to limit the included files to those required by the TRANSLATIONS setting?

@Kwpolska
Copy link
Member

You would need to create your own bundles file, link the base moment script and your desired locales into your assets, and use only that.

@friedelwolff
Copy link
Author

Thanks. The only way I see to do that, is to make a theme, is that right?

If that is the case, I think it would be a great feature addition to the default themes if this can be done automatically, since we know which languages are enabled on the site.

If I check correctly, colorbox-i18n is not bundled by default, but it would still be good if we could avoid putting them in output/ so that the total site can be smaller.

@Kwpolska Kwpolska added this to the Whenever milestone Dec 2, 2015
@Kwpolska
Copy link
Member

Kwpolska commented Dec 2, 2015

Yes, you need a custom theme.

We would need some special handler code. This is doable, but not a priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants