@storybook/core-webpack 10.6.0-alpha.0 → 10.6.0-alpha.2
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/dist/index.d.ts +42 -36
- package/dist/index.js +6 -6
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,58 +1,64 @@
|
|
|
1
|
-
import { StorybookConfig as StorybookConfig$1,
|
|
2
|
-
export { BuilderResult, Options, Preset, TypescriptOptions } from 'storybook/internal/types';
|
|
1
|
+
import { BuilderResult, NormalizedStoriesSpecifier, Options, Options as Options$1, Preset, StorybookConfig as StorybookConfig$1, TypescriptOptions } from "storybook/internal/types";
|
|
3
2
|
|
|
3
|
+
//#region code/lib/core-webpack/.dts-emit/code/lib/core-webpack/src/types.d.ts
|
|
4
4
|
type RulesConfig = any;
|
|
5
5
|
type ModuleConfig = {
|
|
6
|
-
|
|
6
|
+
rules?: RulesConfig[];
|
|
7
7
|
};
|
|
8
8
|
type ResolveConfig = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
extensions?: string[];
|
|
10
|
+
mainFields?: (string | string[])[] | undefined;
|
|
11
|
+
alias?: any;
|
|
12
12
|
};
|
|
13
13
|
interface WebpackConfiguration {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
plugins?: any[];
|
|
15
|
+
module?: ModuleConfig;
|
|
16
|
+
resolve?: ResolveConfig;
|
|
17
|
+
optimization?: any;
|
|
18
|
+
devtool?: false | string | {
|
|
19
|
+
type: 'all' | 'javascript' | 'css';
|
|
20
|
+
use: any;
|
|
21
|
+
}[];
|
|
22
22
|
}
|
|
23
23
|
type BuilderOptions = {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
fsCache?: boolean;
|
|
25
|
+
lazyCompilation?: boolean;
|
|
26
26
|
};
|
|
27
27
|
type StorybookConfig<TWebpackConfiguration = WebpackConfiguration> = StorybookConfig$1 & {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
webpackFinal?: (config: TWebpackConfiguration, options: Options) => TWebpackConfiguration | Promise<TWebpackConfiguration>;
|
|
28
|
+
/**
|
|
29
|
+
* Modify or return a custom Webpack config after the Storybook's default configuration has run
|
|
30
|
+
* (mostly used by addons).
|
|
31
|
+
*/
|
|
32
|
+
webpack?: (config: TWebpackConfiguration, options: Options$1) => TWebpackConfiguration | Promise<TWebpackConfiguration>; /** Modify or return a custom Webpack config after every addon has run. */
|
|
33
|
+
webpackFinal?: (config: TWebpackConfiguration, options: Options$1) => TWebpackConfiguration | Promise<TWebpackConfiguration>;
|
|
35
34
|
};
|
|
36
|
-
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region code/lib/core-webpack/.dts-emit/code/lib/core-webpack/src/load-custom-webpack-config.d.ts
|
|
37
37
|
declare const loadCustomWebpackConfig: (configDir: string) => Promise<any>;
|
|
38
|
-
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region code/lib/core-webpack/.dts-emit/code/lib/core-webpack/src/check-webpack-version.d.ts
|
|
39
40
|
declare const checkWebpackVersion: (webpack: {
|
|
40
|
-
|
|
41
|
+
version?: string;
|
|
41
42
|
}, specifier: string, caption: string) => void;
|
|
42
|
-
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region code/lib/core-webpack/.dts-emit/code/lib/core-webpack/src/merge-webpack-config.d.ts
|
|
43
45
|
declare function mergeConfigs(config: WebpackConfiguration, customConfig: WebpackConfiguration): WebpackConfiguration;
|
|
44
|
-
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region code/lib/core-webpack/.dts-emit/code/lib/core-webpack/src/to-importFn.d.ts
|
|
45
48
|
declare function webpackIncludeRegexp(specifier: NormalizedStoriesSpecifier): RegExp;
|
|
46
49
|
declare function toImportFnPart(specifier: NormalizedStoriesSpecifier): string;
|
|
47
|
-
declare function toImportFn(stories: NormalizedStoriesSpecifier[], {
|
|
48
|
-
|
|
50
|
+
declare function toImportFn(stories: NormalizedStoriesSpecifier[], {
|
|
51
|
+
needPipelinedImport
|
|
52
|
+
}?: {
|
|
53
|
+
needPipelinedImport?: boolean;
|
|
49
54
|
}): string;
|
|
50
|
-
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region code/lib/core-webpack/.dts-emit/code/lib/core-webpack/src/to-require-context.d.ts
|
|
51
57
|
declare const toRequireContext: (specifier: NormalizedStoriesSpecifier) => {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
58
|
+
path: string;
|
|
59
|
+
recursive: boolean;
|
|
60
|
+
match: RegExp;
|
|
55
61
|
};
|
|
56
62
|
declare const toRequireContextString: (specifier: NormalizedStoriesSpecifier) => string;
|
|
57
|
-
|
|
58
|
-
export {
|
|
63
|
+
//#endregion
|
|
64
|
+
export { BuilderOptions, type BuilderResult, ModuleConfig, type Options, type Preset, ResolveConfig, RulesConfig, StorybookConfig, type TypescriptOptions, WebpackConfiguration, checkWebpackVersion, loadCustomWebpackConfig, mergeConfigs, toImportFn, toImportFnPart, toRequireContext, toRequireContextString, webpackIncludeRegexp };
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_mg73o36d9b from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_mg73o36d9b from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_mg73o36d9b from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_mg73o36d9b.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_mg73o36d9b.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_mg73o36d9b.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/core-webpack",
|
|
3
|
-
"version": "10.6.0-alpha.
|
|
3
|
+
"version": "10.6.0-alpha.2",
|
|
4
4
|
"description": "Storybook framework-agnostic API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/node": "^22.19.1",
|
|
44
|
-
"typescript": "^
|
|
44
|
+
"typescript": "^6.0.3",
|
|
45
45
|
"webpack": "5"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"storybook": "^10.6.0-alpha.
|
|
48
|
+
"storybook": "^10.6.0-alpha.2"
|
|
49
49
|
},
|
|
50
50
|
"publishConfig": {
|
|
51
51
|
"access": "public"
|