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:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user