Browse Source

singularize webpack lazy imports for locales

pull/8823/head
Arman Ozak 6 years ago
parent
commit
e80ce1d923
  1. 4
      npm/ng-packs/packages/core/locale/src/utils/register-locale.ts

4
npm/ng-packs/packages/core/locale/src/utils/register-locale.ts

@ -1,5 +1,4 @@
import { differentLocales } from '@abp/ng.core'; import { differentLocales } from '@abp/ng.core';
import { registerLocaleData } from '@angular/common';
import { isDevMode } from '@angular/core'; import { isDevMode } from '@angular/core';
export interface LocaleErrorHandlerData { export interface LocaleErrorHandlerData {
@ -27,7 +26,8 @@ export function registerLocale(
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
return import( return import(
/* webpackChunkName: "_locale-[request]"*/ /* webpackMode: "lazy-once" */
/* webpackChunkName: "locales"*/
/* webpackInclude: /[/\\](ar|cs|en|en-GB|es|de|fr|pt|tr|ru|hu|sl|zh-Hans|zh-Hant).js/ */ /* webpackInclude: /[/\\](ar|cs|en|en-GB|es|de|fr|pt|tr|ru|hu|sl|zh-Hans|zh-Hant).js/ */
/* webpackExclude: /[/\\]global|extra/ */ /* webpackExclude: /[/\\]global|extra/ */
`@angular/common/locales/${localeMap[locale] || locale}.js` `@angular/common/locales/${localeMap[locale] || locale}.js`

Loading…
Cancel
Save