File tree 2 files changed +4
-5
lines changed
2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ export async function preTransformPlugin(): Promise<Plugin> {
57
57
} ;
58
58
}
59
59
60
- export async function postTransformPlugin ( ) : Promise < Plugin > {
60
+ export async function transformPlugin ( ) : Promise < Plugin > {
61
61
const [ { createFilter } , { loadSvelteConfig } ] = await Promise . all ( [
62
62
import ( 'vite' ) ,
63
63
import ( '@sveltejs/vite-plugin-svelte' ) ,
@@ -68,8 +68,7 @@ export async function postTransformPlugin(): Promise<Plugin> {
68
68
const filter = createFilter ( include ) ;
69
69
70
70
return {
71
- name : 'storybook:addon-svelte-csf-plugin-post' ,
72
- enforce : 'post' ,
71
+ name : 'storybook:addon-svelte-csf' ,
73
72
async transform ( compiledCode , id ) {
74
73
if ( ! filter ( id ) ) return undefined ;
75
74
Original file line number Diff line number Diff line change 1
1
import type { StorybookConfig } from '@storybook/svelte-vite' ;
2
2
import type { Options } from '@storybook/types' ;
3
3
4
- import { postTransformPlugin , preTransformPlugin } from '#compiler/plugins' ;
4
+ import { transformPlugin , preTransformPlugin } from '#compiler/plugins' ;
5
5
import { createIndexer } from '#indexer/index' ;
6
6
7
7
export interface StorybookAddonSvelteCsFOptions extends Options {
@@ -28,7 +28,7 @@ export const viteFinal: StorybookConfig['viteFinal'] = async (
28
28
if ( legacyTemplate ) {
29
29
plugins . unshift ( await preTransformPlugin ( ) ) ;
30
30
}
31
- plugins . push ( await postTransformPlugin ( ) ) ;
31
+ plugins . push ( await transformPlugin ( ) ) ;
32
32
33
33
return {
34
34
...restConfig ,
You can’t perform that action at this time.
0 commit comments