File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -240,7 +240,7 @@ export async function execute(
240
240
path . join ( __dirname , 'empty-export-default.js' ) ,
241
241
) ,
242
242
new webpack . NormalModuleReplacementPlugin (
243
- / ^ a n g u l a r - r e s o u r c e : \/ \/ / ,
243
+ / ^ a n g u l a r - r e s o u r c e : s t y l e , / ,
244
244
path . join ( __dirname , 'empty-export-default.js' ) ,
245
245
) ,
246
246
] ,
Original file line number Diff line number Diff line change @@ -146,4 +146,17 @@ describe('Extract i18n Target', () => {
146
146
const fullLog = logs . join ( ) ;
147
147
expect ( fullLog ) . toContain ( 'Duplicate messages with id' ) ;
148
148
} ) ;
149
+
150
+ it ( 'ignores inline styles' , async ( ) => {
151
+ host . appendToFile ( 'src/app/app.component.html' , '<p i18n>i18n test</p>' ) ;
152
+ host . replaceInFile ( 'src/app/app.component.ts' , 'styleUrls' , 'styles' ) ;
153
+ host . replaceInFile ( 'src/app/app.component.ts' , './app.component.css' , 'h1 { color: green; }' ) ;
154
+
155
+ const run = await architect . scheduleTarget ( extractI18nTargetSpec ) ;
156
+
157
+ // This will fail if a style is processed since the style rules are not included during extraction
158
+ await expectAsync ( run . result ) . toBeResolvedTo ( jasmine . objectContaining ( { success : true } ) ) ;
159
+
160
+ await run . stop ( ) ;
161
+ } ) ;
149
162
} ) ;
You can’t perform that action at this time.
0 commit comments