Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Pass down `functions.ignore` values in `firebase.json` to functions emulator so that supposedly ignored directories/files will not trigger reload. (#7414)
1 change: 1 addition & 0 deletions src/emulator/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ export async function startAll(
// TODO(b/213335255): predefinedTriggers and nodeMajorVersion are here to support ext:dev:emulators:* commands.
// Ideally, we should handle that case via ExtensionEmulator.
predefinedTriggers: options.extDevTriggers as ParsedTriggerDefinition[] | undefined,
ignore: cfg.ignore,
});
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/emulator/functionsEmulator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export interface EmulatableBackend {
extension?: Extension; // Only present for published extensions
extensionVersion?: ExtensionVersion; // Only present for published extensions
extensionSpec?: ExtensionSpec; // Only present for local extensions
ignore?: string[];
}

/**
Expand Down Expand Up @@ -460,6 +461,7 @@ export class FunctionsEmulator implements EmulatorInstance {
/(^|[\/\\])\../, // Ignore files which begin the a period
/.+\.log/, // Ignore files which have a .log extension
/.+?[\\\/]venv[\\\/].+?/, // Ignore site-packages in venv
...(backend.ignore?.map((i) => `**/${i}`) ?? []),
],
persistent: true,
});
Expand Down