How do add attributes to window in Ember

That still doesn’t need a separate script tag. They showed that way because they’re assuming nothing about your build system.

It looks like there are two steps to enabling a locale. First you need to make sure the right module is loaded, and then you call the dayjs.locale function to activate it.

If you’re using ember-auto-import and you’ve configured it to support dynamic imports, you can do it like this (probably in your application route’s beforeModel hook, so that it runs early):

await import(`dayjs/locale/${myLocale}`);
dayjs.locale(myLocale);
1 Like