From 57b1379333a0291d2ff49b329fada5b0ed2b9bc2 Mon Sep 17 00:00:00 2001 From: Daksh Miglani Date: Mon, 26 Apr 2021 21:48:10 +0530 Subject: [PATCH] fix bad import generation --- scripts/addConnector.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/addConnector.ts b/scripts/addConnector.ts index 17897780..06af1c7a 100644 --- a/scripts/addConnector.ts +++ b/scripts/addConnector.ts @@ -94,7 +94,7 @@ const questions = [ const match = /export/.exec(content)!; let beforeExport = content.slice(0, match.index).trim(); let afterExport = content.slice(match.index, content.length).split(`{\n`); - beforeExport += `import {${answers.variable_name}} from './${answers.name}'`; + beforeExport += `\nimport {${answers.variable_name}} from './${answers.name}'`; const final = `${beforeExport}\n${afterExport[0]}{\n "${answers.name}": ${answers.variable_name},\n${afterExport[1]}`;