mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 22:21:27 +08:00
Merge pull request #19253 from storybookjs/fix/svelte-generator-e2e
fix svelte e2e test: generate preview file with js extension always
This commit is contained in:
commit
c04e571c1c
@ -205,7 +205,7 @@ export async function baseGenerator(
|
||||
: {}),
|
||||
});
|
||||
|
||||
await configurePreview(renderer, options.commonJs);
|
||||
await configurePreview(renderer);
|
||||
|
||||
if (addComponents) {
|
||||
await copyComponents(renderer, language);
|
||||
|
@ -64,9 +64,9 @@ const frameworkToPreviewParts: Partial<Record<SupportedRenderers, any>> = {
|
||||
},
|
||||
};
|
||||
|
||||
export async function configurePreview(framework: SupportedRenderers, commonJs: boolean) {
|
||||
export async function configurePreview(framework: SupportedRenderers) {
|
||||
const { prefix = '', extraParameters = '' } = frameworkToPreviewParts[framework] || {};
|
||||
const previewPath = `./.storybook/preview.${commonJs ? 'cjs' : 'js'}`;
|
||||
const previewPath = `./.storybook/preview.js`;
|
||||
|
||||
// If the framework template included a preview then we have nothing to do
|
||||
if (await fse.pathExists(previewPath)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user