storybook-builder-rsbuild 0.0.13 → 0.0.14-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 +1 -4
- package/dist/index.mjs +1 -4
- package/package.json +1 -1
- 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'/,
|
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'/,
|
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>
|