diff --git a/code/lib/cli/src/generators/configure.ts b/code/lib/cli/src/generators/configure.ts index 6f558ce16720..8efbf7ba0597 100644 --- a/code/lib/cli/src/generators/configure.ts +++ b/code/lib/cli/src/generators/configure.ts @@ -50,8 +50,7 @@ export async function configureMain({ const tsTemplate = dedent`<>const config<> = <>; export default config;`; - const jsTemplate = dedent`const config = <> - export default config;`; + const jsTemplate = dedent`export default <>;`; const finalTemplate = isTypescript ? tsTemplate : jsTemplate; @@ -62,9 +61,7 @@ export async function configureMain({ await fse.writeFile( `./${storybookConfigFolder}/main.${isTypescript ? 'ts' : 'js'}`, - dedent` - ${mainJsContents} - `, + dedent(mainJsContents), { encoding: 'utf8' } ); }