File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
packages/angular_devkit/build_angular/src/utils Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -145,14 +145,16 @@ export async function generateI18nBrowserWebpackConfigFromContext(
145
145
const config = result . config ;
146
146
147
147
if ( i18n . shouldInline ) {
148
- // Remove localize "polyfill"
149
- if ( ! config . resolve ) {
150
- config . resolve = { } ;
148
+ // Remove localize "polyfill" if in AOT mode
149
+ if ( buildOptions . aot ) {
150
+ if ( ! config . resolve ) {
151
+ config . resolve = { } ;
152
+ }
153
+ if ( ! config . resolve . alias ) {
154
+ config . resolve . alias = { } ;
155
+ }
156
+ config . resolve . alias [ '@angular/localize/init' ] = require . resolve ( './empty.js' ) ;
151
157
}
152
- if ( ! config . resolve . alias ) {
153
- config . resolve . alias = { } ;
154
- }
155
- config . resolve . alias [ '@angular/localize/init' ] = require . resolve ( './empty.js' ) ;
156
158
157
159
// Update file hashes to include translation file content
158
160
const i18nHash = Object . values ( i18n . locales ) . reduce (
You can’t perform that action at this time.
0 commit comments