From b7cc2d38611c11fd26dc57542b8851298cc60eb9 Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Thu, 23 Feb 2023 17:06:25 +0100 Subject: [PATCH] Rollback preview.ts templates --- code/lib/cli/src/generators/configure.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/code/lib/cli/src/generators/configure.ts b/code/lib/cli/src/generators/configure.ts index 29ee47eff6d6..2e0b3649361e 100644 --- a/code/lib/cli/src/generators/configure.ts +++ b/code/lib/cli/src/generators/configure.ts @@ -127,7 +127,7 @@ export async function configurePreview(options: ConfigurePreviewOptions) { } const prefix = [ - isTypescript && rendererPackage ? `import type { Preview } from '${rendererPackage}'` : '', + // isTypescript && rendererPackage ? `import type { Preview } from '${rendererPackage}'` : '', frameworkPrefix, ] .filter(Boolean) @@ -136,10 +136,8 @@ export async function configurePreview(options: ConfigurePreviewOptions) { const preview = dedent` ${prefix}${prefix.length > 0 ? '\n' : ''} ${ - !isTypescript && rendererPackage - ? `/** @type { import('${rendererPackage}').Preview } */\n` - : '' - }const preview${isTypescript ? ': Preview' : ''} = { + rendererPackage ? `/** @type { import('${rendererPackage}').Preview } */\n` : '' + }const preview = { parameters: { backgrounds: { default: 'light',