@rspress/runtime 1.3.1 → 1.3.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/utils.js +2 -1
- package/package.json +2 -2
- package/src/utils.ts +2 -1
package/dist/utils.js
CHANGED
@@ -26,7 +26,8 @@ function normalizeHrefInRuntime(a) {
|
|
26
26
|
return normalizeHref(a, cleanUrls);
|
27
27
|
}
|
28
28
|
function normalizeImagePath(imagePath) {
|
29
|
-
|
29
|
+
const isProd = isProduction();
|
30
|
+
if (isExternalUrl(imagePath) || !isProd) {
|
30
31
|
return imagePath;
|
31
32
|
}
|
32
33
|
return withBase(imagePath);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@rspress/runtime",
|
3
|
-
"version": "1.3.
|
3
|
+
"version": "1.3.2",
|
4
4
|
"description": "The Runtime of Rspress Documentation Framework",
|
5
5
|
"bugs": "https://github.com/web-infra-dev/rspress/issues",
|
6
6
|
"repository": {
|
@@ -34,7 +34,7 @@
|
|
34
34
|
"react-dom": "^18.2.0",
|
35
35
|
"react-helmet-async": "^1.3.0",
|
36
36
|
"react-router-dom": "^6.8.1",
|
37
|
-
"@rspress/shared": "1.3.
|
37
|
+
"@rspress/shared": "1.3.2"
|
38
38
|
},
|
39
39
|
"devDependencies": {
|
40
40
|
"@modern-js/tsconfig": "2.39.0",
|
package/src/utils.ts
CHANGED
@@ -36,7 +36,8 @@ export function normalizeHrefInRuntime(a: string) {
|
|
36
36
|
}
|
37
37
|
|
38
38
|
export function normalizeImagePath(imagePath: string) {
|
39
|
-
|
39
|
+
const isProd = isProduction();
|
40
|
+
if (isExternalUrl(imagePath) || !isProd) {
|
40
41
|
return imagePath;
|
41
42
|
}
|
42
43
|
|