Skip to content

Commit a4685f6

Browse files
committed
fixed regex in rollup plugin
1 parent 299f614 commit a4685f6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/build/rollup_replace_declare_module.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* Returns a rollup plugin to replace any `declare module X { Y }` code blocks with `Y`.
2020
* This was developed to support the generation of `global_index.d.ts`
2121
* used for the Google3 import of `firebase/firestore`
22-
*
22+
*
2323
* @param fileName perform the replace in this file
2424
* @param moduleName search for and replace this module declaration
2525
*/
@@ -82,7 +82,7 @@ function findDeclareModuleBlock(inputString, moduleName) {
8282

8383
// Construct the RegExp object dynamically. It searches for:
8484
// 'declare module ' + single quote + escaped module name + single quote + space + '{'
85-
const searchRegex = new RegExp(`declare module '${escapedModuleName}' \{`);
85+
const searchRegex = new RegExp(`declare module '${escapedModuleName}' {`);
8686
const match = inputString.match(searchRegex);
8787

8888
if (!match || match.index === undefined) {
@@ -138,4 +138,4 @@ function findDeclareModuleBlock(inputString, moduleName) {
138138
};
139139

140140
return { fullBlock, innerContent };
141-
}
141+
}

0 commit comments

Comments
 (0)