diff --git a/generator/gen.ts b/generator/gen.ts index e8838f9..45797fc 100755 --- a/generator/gen.ts +++ b/generator/gen.ts @@ -168,7 +168,7 @@ export default async (params: { files: string[] }) => { }, null, 2, - ).replaceAll(PLACEHOLDER_ID, name); + ).replace(new RegExp(escapeRegexp(PLACEHOLDER_ID), 'gmi'), name); if (existing !== newContents) { await fs.writeFile(saved, newContents, { encoding: 'utf8', flag: 'w' }); }