storybook-addon-modernjs 3.4.0 → 3.4.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.js +6 -6
- package/dist/preset.js +14 -16
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_bc75b71e0a36bf57 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_bc75b71e0a36bf57 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_bc75b71e0a36bf57 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_bc75b71e0a36bf57.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_bc75b71e0a36bf57.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_bc75b71e0a36bf57.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
package/dist/preset.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_bc75b71e0a36bf57 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_bc75b71e0a36bf57 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_bc75b71e0a36bf57 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_bc75b71e0a36bf57.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_bc75b71e0a36bf57.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_bc75b71e0a36bf57.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -25,6 +25,9 @@ import {
|
|
|
25
25
|
import { mergeRsbuildConfig } from "@rsbuild/core";
|
|
26
26
|
import findUp from "find-up";
|
|
27
27
|
import { logger } from "rslog";
|
|
28
|
+
import {
|
|
29
|
+
stripInheritedConfig
|
|
30
|
+
} from "storybook-builder-rsbuild";
|
|
28
31
|
var MODERN_META_NAME = "modern-js", MODERN_CONFIG_FILE = "modern.config.ts", loadCreateStorybookOptions = async () => {
|
|
29
32
|
try {
|
|
30
33
|
return (await import("@modern-js/plugin/cli")).createStorybookOptions;
|
|
@@ -71,20 +74,15 @@ var MODERN_META_NAME = "modern-js", MODERN_CONFIG_FILE = "modern.config.ts", loa
|
|
|
71
74
|
appContext: getAppContext(),
|
|
72
75
|
normalizedConfig: resolveConfig
|
|
73
76
|
};
|
|
74
|
-
|
|
77
|
+
return stripInheritedConfig(
|
|
78
|
+
rsbuildConfig,
|
|
79
|
+
"the loaded Modern.js config"
|
|
80
|
+
), rsbuildConfig.plugins = [
|
|
75
81
|
...rsbuildPlugins,
|
|
76
82
|
...rsbuildConfig.plugins || [],
|
|
77
83
|
builderPluginAdapterBasic(adapterParams),
|
|
78
84
|
builderPluginAdapterHooks(adapterParams)
|
|
79
|
-
], rsbuildConfig
|
|
80
|
-
for (let key of [
|
|
81
|
-
"distPath",
|
|
82
|
-
"assetPrefix",
|
|
83
|
-
"cleanDistPath",
|
|
84
|
-
"filename"
|
|
85
|
-
])
|
|
86
|
-
delete rsbuildConfig.output[key];
|
|
87
|
-
return mergeRsbuildConfig(config, rsbuildConfig);
|
|
85
|
+
], mergeRsbuildConfig(config, rsbuildConfig);
|
|
88
86
|
};
|
|
89
87
|
export {
|
|
90
88
|
rsbuildFinal
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "storybook-addon-modernjs",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.2",
|
|
4
4
|
"description": "Storybook addon for loading configuration of Modern.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -40,20 +40,20 @@
|
|
|
40
40
|
"rslog": "1.3.2"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@modern-js/app-tools": "^3.
|
|
44
|
-
"@modern-js/plugin": "^3.
|
|
45
|
-
"@rsbuild/core": "^2.1.
|
|
43
|
+
"@modern-js/app-tools": "^3.8.1",
|
|
44
|
+
"@modern-js/plugin": "^3.8.1",
|
|
45
|
+
"@rsbuild/core": "^2.1.10",
|
|
46
46
|
"@types/node": "^22.0.0",
|
|
47
47
|
"storybook": "10.5.5",
|
|
48
48
|
"typescript": "^5.9.3",
|
|
49
|
-
"storybook-builder-rsbuild": "3.4.
|
|
49
|
+
"storybook-builder-rsbuild": "3.4.2"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"@modern-js/app-tools": "^2.67.9 || ^3.0.0-0",
|
|
53
53
|
"@modern-js/plugin": "^3.0.0",
|
|
54
54
|
"@modern-js/plugin-v2": "^2.70.4",
|
|
55
55
|
"@rsbuild/core": "^1.5.0 || ^2.0.0-0",
|
|
56
|
-
"storybook-builder-rsbuild": "
|
|
56
|
+
"storybook-builder-rsbuild": "^3.4.2"
|
|
57
57
|
},
|
|
58
58
|
"peerDependenciesMeta": {
|
|
59
59
|
"@modern-js/plugin": {
|