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:27:10 +02:00
committed by GitHub
parent a936761afe
commit 1e88954016
@@ -96,7 +96,7 @@ export const backendPlugin = createFactory<Options>({
);
if (backendStartIndex !== -1) {
const [indentation] = lines[backendStartIndex].match(/^\s*/) ?? [];
const [indentation] = lines[backendStartIndex].match(/^\s*/)!;
lines.splice(backendStartIndex, 0, `${indentation}${backendAddLine}`);
const newContent = lines.join('\n');