@modern-js/storybook-builder 2.55.0 → 2.56.0
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/cjs/core.js +7 -5
- package/dist/esm/core.js +6 -5
- package/package.json +9 -9
package/dist/cjs/core.js
CHANGED
@@ -27,6 +27,7 @@ var import_core2 = require("@modern-js/core");
|
|
27
27
|
var import_utils = require("./utils");
|
28
28
|
var import_plugin_storybook = require("./plugin-storybook");
|
29
29
|
async function createBuilder(cwd, builderOptions, options) {
|
30
|
+
var _uniBuilderConfig;
|
30
31
|
const { bundler } = builderOptions;
|
31
32
|
const { presets } = options;
|
32
33
|
const entries = await presets.apply("entries", []);
|
@@ -34,16 +35,17 @@ async function createBuilder(cwd, builderOptions, options) {
|
|
34
35
|
const loadedConfig = res ? res.config : {};
|
35
36
|
const finalConfig = await presets.apply("modern", loadedConfig) || loadedConfig;
|
36
37
|
const uniBuilderConfig = builderOptions.builderConfig ? (0, import_core.mergeRsbuildConfig)(finalConfig, builderOptions.builderConfig) : finalConfig || {};
|
38
|
+
var _source;
|
39
|
+
(_source = (_uniBuilderConfig = uniBuilderConfig).source) !== null && _source !== void 0 ? _source : _uniBuilderConfig.source = {};
|
40
|
+
uniBuilderConfig.source.entry = {
|
41
|
+
main: entries
|
42
|
+
};
|
37
43
|
const bundlerType = bundler || "webpack";
|
38
44
|
const builder = await (0, import_uni_builder.createUniBuilder)({
|
39
45
|
bundlerType,
|
40
46
|
cwd,
|
41
|
-
target: "web",
|
42
47
|
frameworkConfigPath: (res === null || res === void 0 ? void 0 : res.path) ? res.path : void 0,
|
43
|
-
config: bundlerType === "webpack" ? await (0, import_plugin_storybook.addonBabelAdapter)(uniBuilderConfig, options) : uniBuilderConfig
|
44
|
-
entry: {
|
45
|
-
main: entries
|
46
|
-
}
|
48
|
+
config: bundlerType === "webpack" ? await (0, import_plugin_storybook.addonBabelAdapter)(uniBuilderConfig, options) : uniBuilderConfig
|
47
49
|
});
|
48
50
|
builder.addPlugins([
|
49
51
|
(0, import_plugin_storybook.pluginStorybook)(cwd, options),
|
package/dist/esm/core.js
CHANGED
@@ -4,6 +4,7 @@ import { loadConfig } from "@modern-js/core";
|
|
4
4
|
import { getConfigFileName, runWithErrorMsg } from "./utils";
|
5
5
|
import { pluginStorybook, addonBabelAdapter } from "./plugin-storybook";
|
6
6
|
async function createBuilder(cwd, builderOptions, options) {
|
7
|
+
var _a;
|
7
8
|
const { bundler } = builderOptions;
|
8
9
|
const { presets } = options;
|
9
10
|
const entries = await presets.apply("entries", []);
|
@@ -17,16 +18,16 @@ async function createBuilder(cwd, builderOptions, options) {
|
|
17
18
|
finalConfig,
|
18
19
|
builderOptions.builderConfig
|
19
20
|
) : finalConfig || {};
|
21
|
+
(_a = uniBuilderConfig.source) != null ? _a : uniBuilderConfig.source = {};
|
22
|
+
uniBuilderConfig.source.entry = {
|
23
|
+
main: entries
|
24
|
+
};
|
20
25
|
const bundlerType = bundler || "webpack";
|
21
26
|
const builder = await createUniBuilder({
|
22
27
|
bundlerType,
|
23
28
|
cwd,
|
24
|
-
target: "web",
|
25
29
|
frameworkConfigPath: (res == null ? void 0 : res.path) ? res.path : void 0,
|
26
|
-
config: bundlerType === "webpack" ? await addonBabelAdapter(uniBuilderConfig, options) : uniBuilderConfig
|
27
|
-
entry: {
|
28
|
-
main: entries
|
29
|
-
}
|
30
|
+
config: bundlerType === "webpack" ? await addonBabelAdapter(uniBuilderConfig, options) : uniBuilderConfig
|
30
31
|
});
|
31
32
|
builder.addPlugins([
|
32
33
|
pluginStorybook(cwd, options),
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@modern-js/storybook-builder",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.56.0",
|
4
4
|
"description": "modern.js support for storybook",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -51,7 +51,7 @@
|
|
51
51
|
},
|
52
52
|
"license": "MIT",
|
53
53
|
"dependencies": {
|
54
|
-
"@rsbuild/core": "0.
|
54
|
+
"@rsbuild/core": "1.0.1-beta.3",
|
55
55
|
"@storybook/components": "~7.6.12",
|
56
56
|
"@storybook/core-common": "~7.6.12",
|
57
57
|
"@storybook/csf-plugin": "~7.6.12",
|
@@ -70,18 +70,18 @@
|
|
70
70
|
"remark-slug": "^7.0.1",
|
71
71
|
"serve-static": "^1.14.1",
|
72
72
|
"tinypool": "^0.8.0",
|
73
|
-
"@modern-js/uni-builder": "2.
|
74
|
-
"@modern-js/core": "2.
|
75
|
-
"@modern-js/runtime": "2.
|
76
|
-
"@modern-js/utils": "2.
|
73
|
+
"@modern-js/uni-builder": "2.56.0",
|
74
|
+
"@modern-js/core": "2.56.0",
|
75
|
+
"@modern-js/runtime": "2.56.0",
|
76
|
+
"@modern-js/utils": "2.56.0"
|
77
77
|
},
|
78
78
|
"devDependencies": {
|
79
79
|
"@storybook/types": "~7.6.12",
|
80
|
-
"@types/babel__core": "^7.20.
|
80
|
+
"@types/babel__core": "^7.20.5",
|
81
81
|
"@types/serve-static": "^1.13.10",
|
82
82
|
"typescript": "^5.2.2",
|
83
|
-
"@
|
84
|
-
"@
|
83
|
+
"@modern-js/core": "2.56.0",
|
84
|
+
"@scripts/build": "2.56.0"
|
85
85
|
},
|
86
86
|
"publishConfig": {
|
87
87
|
"registry": "https://registry.npmjs.org/",
|