Update packages/cli/src/lib/new/factories/backendPlugin.ts

Co-authored-by: Fredrik Adelöw <freben@gmail.com>
Signed-off-by: Alper Altay <43654387+alper98@users.noreply.github.com>
This commit is contained in:
Alper Altay
2024-06-25 12:26:51 +02:00
committed by GitHub
parent 42227da4ac
commit a936761afe
@@ -97,7 +97,7 @@ export const backendPlugin = createFactory<Options>({
if (backendStartIndex !== -1) {
const [indentation] = lines[backendStartIndex].match(/^\s*/) ?? [];
lines.splice(backendStartIndex, 0, indentation + backendAddLine);
lines.splice(backendStartIndex, 0, `${indentation}${backendAddLine}`);
const newContent = lines.join('\n');
await fs.writeFile(backendFilePath, newContent, 'utf8');