storybook-builder-rsbuild 0.0.12 → 0.0.13-beta.1
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 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
- package/templates/preview.ejs +38 -6
package/dist/index.js
CHANGED
@@ -414,6 +414,7 @@ var iframe_rsbuild_config_default = async (options) => {
|
|
414
414
|
const merged = (0, import_core.mergeRsbuildConfig)(contentFromConfig, {
|
415
415
|
output: {
|
416
416
|
cleanDistPath: false,
|
417
|
+
assetPrefix: "/",
|
417
418
|
dataUriLimit: {
|
418
419
|
media: 1e4
|
419
420
|
},
|
@@ -430,7 +431,6 @@ var iframe_rsbuild_config_default = async (options) => {
|
|
430
431
|
font: resourceFilename,
|
431
432
|
media: resourceFilename
|
432
433
|
},
|
433
|
-
assetPrefix: "/",
|
434
434
|
externals
|
435
435
|
},
|
436
436
|
server: {
|
@@ -439,7 +439,7 @@ var iframe_rsbuild_config_default = async (options) => {
|
|
439
439
|
publicDir: false
|
440
440
|
},
|
441
441
|
dev: {
|
442
|
-
assetPrefix: "",
|
442
|
+
assetPrefix: "/",
|
443
443
|
progressBar: !quiet
|
444
444
|
},
|
445
445
|
source: {
|
package/dist/index.mjs
CHANGED
@@ -357,6 +357,7 @@ var iframe_rsbuild_config_default = async (options) => {
|
|
357
357
|
const merged = mergeRsbuildConfig(contentFromConfig, {
|
358
358
|
output: {
|
359
359
|
cleanDistPath: false,
|
360
|
+
assetPrefix: "/",
|
360
361
|
dataUriLimit: {
|
361
362
|
media: 1e4
|
362
363
|
},
|
@@ -373,7 +374,6 @@ var iframe_rsbuild_config_default = async (options) => {
|
|
373
374
|
font: resourceFilename,
|
374
375
|
media: resourceFilename
|
375
376
|
},
|
376
|
-
assetPrefix: "/",
|
377
377
|
externals
|
378
378
|
},
|
379
379
|
server: {
|
@@ -382,7 +382,7 @@ var iframe_rsbuild_config_default = async (options) => {
|
|
382
382
|
publicDir: false
|
383
383
|
},
|
384
384
|
dev: {
|
385
|
-
assetPrefix: "",
|
385
|
+
assetPrefix: "/",
|
386
386
|
progressBar: !quiet
|
387
387
|
},
|
388
388
|
source: {
|
package/package.json
CHANGED
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>
|