X Tutup
Skip to content

Commit 78bfdf7

Browse files
Tim Blasikegluneq
authored andcommitted
feat(dart/transform): DirectiveProcessor: do not process generated files
Prevent `DirectiveProcessor` from processing files which were generated by the Angular2 Dart transformer. Closes #6517
1 parent a24ee6a commit 78bfdf7

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

modules_dart/transform/lib/src/transform/common/names.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ const ALL_EXTENSIONS = const [
3939
bool isGenerated(String uri) {
4040
return const [
4141
DEPS_EXTENSION,
42+
META_EXTENSION,
4243
NON_SHIMMED_STYLESHEET_EXTENSION,
4344
SHIMMED_STYLESHEET_EXTENSION,
45+
SUMMARY_META_EXTENSION,
4446
TEMPLATE_EXTENSION,
4547
].any((ext) => uri.endsWith(ext));
4648
}

modules_dart/transform/lib/src/transform/directive_processor/transformer.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ class DirectiveProcessor extends Transformer implements LazyTransformer {
2828
DirectiveProcessor(this.options);
2929

3030
@override
31-
bool isPrimary(AssetId id) => id.extension.endsWith('dart');
31+
bool isPrimary(AssetId id) =>
32+
id.extension.endsWith('dart') && !isGenerated(id.path);
3233

3334
@override
3435
declareOutputs(DeclaringTransform transform) {

0 commit comments

Comments
 (0)
X Tutup