Closed as not planned
Description
Command
build
Description
in our code we use this (but we have more constructs like this to load locale or language specific files)
return new Promise<string>((resolve, reject) => {
import(
`@/../../node_modules/@angular/common/locales/${localeId}.mjs`).then(
module => {
registerLocaleData(module.default, localeId);
resolve(localeId);
},
() => {
import(`@/../../node_modules/@angular/common/locales/${language.toLowerCase()}.mjs`).then(module => {
registerLocaleData(module.default, localeId.split('-')[0]);
resolve(language.toLowerCase());
}, reject);
});
});
but that doesn't seem to work in an esbuild.
is there another way? The none esbuild will generate for our product a huge number of files because of this (all the locale files that match that pattern)
Describe the solution you'd like
that the above import( string with variable
) does work to load in specific lazy chunks
Describe alternatives you've considered
No response
Metadata
Metadata
Assignees
Labels
No labels