@storybook/builder-vite 8.3.0-alpha.1 → 8.3.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/index.d.ts +5 -10
- package/dist/index.js +15 -15
- package/dist/index.mjs +29 -30
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -117,7 +117,9 @@ The function should return the updated Vite configuration.
|
|
|
117
117
|
Configure your `.storybook/main.ts` to use TypeScript:
|
|
118
118
|
|
|
119
119
|
```typescript
|
|
120
|
-
import type { StorybookConfig } from '@storybook/react-vite';
|
|
120
|
+
import type { StorybookConfig } from '@storybook/react-vite';
|
|
121
|
+
|
|
122
|
+
// (or whatever framework you are using)
|
|
121
123
|
|
|
122
124
|
const config: StorybookConfig = {
|
|
123
125
|
// other storybook options...,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { UserConfig, InlineConfig, PluginOption } from 'vite';
|
|
2
1
|
import { Builder, Options } from 'storybook/internal/types';
|
|
2
|
+
import { UserConfig, InlineConfig, PluginOption } from 'vite';
|
|
3
3
|
|
|
4
4
|
type ViteStats = {
|
|
5
5
|
toJson: () => any;
|
|
@@ -10,21 +10,16 @@ type StorybookConfigVite = {
|
|
|
10
10
|
viteFinal?: ViteFinal;
|
|
11
11
|
};
|
|
12
12
|
type BuilderOptions = {
|
|
13
|
-
/**
|
|
14
|
-
* Path to vite.config file, relative to CWD.
|
|
15
|
-
*/
|
|
13
|
+
/** Path to `vite.config` file, relative to `process.cwd()`. */
|
|
16
14
|
viteConfigPath?: string;
|
|
17
15
|
};
|
|
18
16
|
|
|
19
|
-
/**
|
|
20
|
-
* Recursively removes all plugins with the names given
|
|
21
|
-
* Resolves async plugins
|
|
22
|
-
*/
|
|
17
|
+
/** Recursively removes all plugins with the names given Resolves async plugins */
|
|
23
18
|
declare const withoutVitePlugins: (plugins: PluginOption[] | undefined, namesToRemove: string[]) => Promise<PluginOption[]>;
|
|
24
19
|
|
|
25
20
|
/**
|
|
26
|
-
* Returns true if ANY of the plugins in the array have a name that matches one of the names in the
|
|
27
|
-
* Will resolve any promises in the array.
|
|
21
|
+
* Returns true if ANY of the plugins in the array have a name that matches one of the names in the
|
|
22
|
+
* names array. Will resolve any promises in the array.
|
|
28
23
|
*/
|
|
29
24
|
declare function hasVitePlugins(plugins: PluginOption[], names: string[]): Promise<boolean>;
|
|
30
25
|
|