storybook-builder-rsbuild 0.0.13 → 0.0.14
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 +2 -5
- package/dist/index.mjs +2 -5
- package/package.json +4 -4
- package/templates/preview.ejs +38 -6
package/dist/index.js
CHANGED
@@ -439,6 +439,7 @@ var iframe_rsbuild_config_default = async (options) => {
|
|
439
439
|
publicDir: false
|
440
440
|
},
|
441
441
|
dev: {
|
442
|
+
assetPrefix: "/",
|
442
443
|
progressBar: !quiet
|
443
444
|
},
|
444
445
|
source: {
|
@@ -493,10 +494,6 @@ var iframe_rsbuild_config_default = async (options) => {
|
|
493
494
|
config.watchOptions = {
|
494
495
|
ignored: /node_modules/
|
495
496
|
};
|
496
|
-
if (!isProd) {
|
497
|
-
config.output = config.output || {};
|
498
|
-
config.output.publicPath = "";
|
499
|
-
}
|
500
497
|
config.ignoreWarnings = [
|
501
498
|
...config.ignoreWarnings || [],
|
502
499
|
/export '\S+' was not found in 'global'/,
|
@@ -690,7 +687,7 @@ var start = async ({
|
|
690
687
|
import_express.default.static(previewDirOrigin, { immutable: true, maxAge: "5m" })
|
691
688
|
);
|
692
689
|
router.use(rsbuildServer.middlewares);
|
693
|
-
|
690
|
+
rsbuildServer.connectWebSocket({ server: storybookServer });
|
694
691
|
const stats = await waitFirstCompileDone;
|
695
692
|
return {
|
696
693
|
bail,
|
package/dist/index.mjs
CHANGED
@@ -382,6 +382,7 @@ var iframe_rsbuild_config_default = async (options) => {
|
|
382
382
|
publicDir: false
|
383
383
|
},
|
384
384
|
dev: {
|
385
|
+
assetPrefix: "/",
|
385
386
|
progressBar: !quiet
|
386
387
|
},
|
387
388
|
source: {
|
@@ -438,10 +439,6 @@ var iframe_rsbuild_config_default = async (options) => {
|
|
438
439
|
config.watchOptions = {
|
439
440
|
ignored: /node_modules/
|
440
441
|
};
|
441
|
-
if (!isProd) {
|
442
|
-
config.output = config.output || {};
|
443
|
-
config.output.publicPath = "";
|
444
|
-
}
|
445
442
|
config.ignoreWarnings = [
|
446
443
|
...config.ignoreWarnings || [],
|
447
444
|
/export '\S+' was not found in 'global'/,
|
@@ -631,7 +628,7 @@ var start = async ({
|
|
631
628
|
express.static(previewDirOrigin, { immutable: true, maxAge: "5m" })
|
632
629
|
);
|
633
630
|
router.use(rsbuildServer.middlewares);
|
634
|
-
|
631
|
+
rsbuildServer.connectWebSocket({ server: storybookServer });
|
635
632
|
const stats = await waitFirstCompileDone;
|
636
633
|
return {
|
637
634
|
bail,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "storybook-builder-rsbuild",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.14",
|
4
4
|
"description": "Rsbuild builder for Storybook",
|
5
5
|
"keywords": [
|
6
6
|
"storybook",
|
@@ -56,7 +56,7 @@
|
|
56
56
|
"!src/**/*"
|
57
57
|
],
|
58
58
|
"dependencies": {
|
59
|
-
"@rsbuild/plugin-type-check": "1.0.1-beta.
|
59
|
+
"@rsbuild/plugin-type-check": "1.0.1-beta.14",
|
60
60
|
"@storybook/addon-docs": "^8.2.1",
|
61
61
|
"@storybook/core-webpack": "^8.2.1",
|
62
62
|
"browser-assert": "^1.2.1",
|
@@ -78,7 +78,7 @@
|
|
78
78
|
"util-deprecate": "^1.0.2"
|
79
79
|
},
|
80
80
|
"devDependencies": {
|
81
|
-
"@rsbuild/core": "1.0.1-beta.
|
81
|
+
"@rsbuild/core": "1.0.1-beta.14",
|
82
82
|
"@types/express": "^4.17.21",
|
83
83
|
"@types/fs-extra": "^11.0.4",
|
84
84
|
"@types/node": "^18.0.0",
|
@@ -90,7 +90,7 @@
|
|
90
90
|
"typescript": "^5.3.2"
|
91
91
|
},
|
92
92
|
"peerDependencies": {
|
93
|
-
"@rsbuild/core": ">= 1.0.
|
93
|
+
"@rsbuild/core": ">= 1.0.1-beta.14 || 1.x",
|
94
94
|
"storybook": "^8.2.1"
|
95
95
|
},
|
96
96
|
"peerDependenciesMeta": {
|
package/templates/preview.ejs
CHANGED
@@ -10,11 +10,39 @@
|
|
10
10
|
|
11
11
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
12
12
|
|
13
|
-
<
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
<style>
|
14
|
+
@font-face {
|
15
|
+
font-family: 'Nunito Sans';
|
16
|
+
font-style: normal;
|
17
|
+
font-weight: 400;
|
18
|
+
font-display: swap;
|
19
|
+
src: url('./sb-common-assets/nunito-sans-regular.woff2') format('woff2');
|
20
|
+
}
|
21
|
+
|
22
|
+
@font-face {
|
23
|
+
font-family: 'Nunito Sans';
|
24
|
+
font-style: italic;
|
25
|
+
font-weight: 400;
|
26
|
+
font-display: swap;
|
27
|
+
src: url('./sb-common-assets/nunito-sans-italic.woff2') format('woff2');
|
28
|
+
}
|
29
|
+
|
30
|
+
@font-face {
|
31
|
+
font-family: 'Nunito Sans';
|
32
|
+
font-style: normal;
|
33
|
+
font-weight: 700;
|
34
|
+
font-display: swap;
|
35
|
+
src: url('./sb-common-assets/nunito-sans-bold.woff2') format('woff2');
|
36
|
+
}
|
37
|
+
|
38
|
+
@font-face {
|
39
|
+
font-family: 'Nunito Sans';
|
40
|
+
font-style: italic;
|
41
|
+
font-weight: 700;
|
42
|
+
font-display: swap;
|
43
|
+
src: url('./sb-common-assets/nunito-sans-bold-italic.woff2') format('woff2');
|
44
|
+
}
|
45
|
+
</style>
|
18
46
|
|
19
47
|
<% if (typeof headHtmlSnippet !== 'undefined') { %> <%= headHtmlSnippet %> <% } %> <%
|
20
48
|
htmlWebpackPlugin.files.css.forEach(file => { %>
|
@@ -47,7 +75,11 @@
|
|
47
75
|
import './sb-preview/runtime.js';
|
48
76
|
|
49
77
|
<% htmlWebpackPlugin.files.js.forEach(file => { %>
|
50
|
-
|
78
|
+
<% if (file.startsWith('/')) { %>
|
79
|
+
import '.<%= file %>';
|
80
|
+
<% } else { %>
|
81
|
+
import './<%= file %>';
|
82
|
+
<% } %>
|
51
83
|
<% }); %>
|
52
84
|
</script>
|
53
85
|
</body>
|