@rspress/plugin-preview 2.0.0-beta.20 → 2.0.0-beta.21
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.d.ts
CHANGED
package/dist/index.js
CHANGED
@@ -4,8 +4,8 @@ import { createRsbuild, mergeRsbuildConfig } from "@rsbuild/core";
|
|
4
4
|
import { pluginBabel } from "@rsbuild/plugin-babel";
|
5
5
|
import { pluginReact } from "@rsbuild/plugin-react";
|
6
6
|
import { pluginSolid } from "@rsbuild/plugin-solid";
|
7
|
-
import { RSPRESS_TEMP_DIR, normalizePosixPath, removeTrailingSlash } from "@rspress/shared";
|
8
7
|
import { cloneDeep, isEqual } from "lodash";
|
8
|
+
import { RSPRESS_TEMP_DIR, normalizePosixPath, removeTrailingSlash } from "rspress/core";
|
9
9
|
import node_fs, { writeFileSync } from "node:fs";
|
10
10
|
const staticPath = node_path.join(__dirname, '..', 'static');
|
11
11
|
const demoBlockComponentPath = node_path.join(staticPath, 'global-components', 'DemoBlock.tsx');
|
@@ -449,9 +449,13 @@ function pluginPreview(options) {
|
|
449
449
|
printUrls: ()=>void 0,
|
450
450
|
strictPort: true
|
451
451
|
},
|
452
|
+
dev: {
|
453
|
+
lazyCompilation: false
|
454
|
+
},
|
452
455
|
performance: {
|
453
456
|
...performance,
|
454
|
-
printFileSize: false
|
457
|
+
printFileSize: false,
|
458
|
+
buildCache: false
|
455
459
|
},
|
456
460
|
html,
|
457
461
|
source: {
|
@@ -465,8 +469,7 @@ function pluginPreview(options) {
|
|
465
469
|
root: outDir
|
466
470
|
},
|
467
471
|
copy: void 0
|
468
|
-
}
|
469
|
-
plugins: config?.builderPlugins
|
472
|
+
}
|
470
473
|
}, builderConfig);
|
471
474
|
const rsbuildInstance = await createRsbuild({
|
472
475
|
callerName: 'rspress',
|
package/index.d.ts
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@rspress/plugin-preview",
|
3
|
-
"version": "2.0.0-beta.
|
3
|
+
"version": "2.0.0-beta.21",
|
4
4
|
"description": "A plugin for rspress to preview the code block in markdown/mdx file.",
|
5
5
|
"bugs": "https://github.com/web-infra-dev/rspress/issues",
|
6
6
|
"repository": {
|
@@ -23,19 +23,18 @@
|
|
23
23
|
"static"
|
24
24
|
],
|
25
25
|
"dependencies": {
|
26
|
-
"@rsbuild/core": "~1.4.
|
26
|
+
"@rsbuild/core": "~1.4.6",
|
27
27
|
"@rsbuild/plugin-babel": "~1.0.5",
|
28
|
-
"@rsbuild/plugin-less": "~1.2.
|
29
|
-
"@rsbuild/plugin-react": "~1.3.
|
30
|
-
"@rsbuild/plugin-sass": "~1.3.
|
28
|
+
"@rsbuild/plugin-less": "~1.2.5",
|
29
|
+
"@rsbuild/plugin-react": "~1.3.4",
|
30
|
+
"@rsbuild/plugin-sass": "~1.3.3",
|
31
31
|
"@rsbuild/plugin-solid": "~1.0.5",
|
32
32
|
"lodash": "4.17.21",
|
33
33
|
"qrcode.react": "^4.2.0",
|
34
|
-
"@rspress/
|
35
|
-
"@rspress/theme-default": "2.0.0-beta.20"
|
34
|
+
"@rspress/theme-default": "2.0.0-beta.21"
|
36
35
|
},
|
37
36
|
"devDependencies": {
|
38
|
-
"@rslib/core": "0.10.
|
37
|
+
"@rslib/core": "0.10.5",
|
39
38
|
"@types/lodash": "^4.17.20",
|
40
39
|
"@types/mdast": "^4.0.4",
|
41
40
|
"@types/node": "^22.8.1",
|
@@ -52,9 +51,9 @@
|
|
52
51
|
"unist-util-visit": "^5.0.0"
|
53
52
|
},
|
54
53
|
"peerDependencies": {
|
55
|
-
"@rspress/core": "^2.0.0-beta.20",
|
56
54
|
"react": ">=18.0.0",
|
57
|
-
"react-router-dom": "^6.8.1"
|
55
|
+
"react-router-dom": "^6.8.1",
|
56
|
+
"rspress": "^2.0.0-beta.21"
|
58
57
|
},
|
59
58
|
"engines": {
|
60
59
|
"node": ">=18.0.0"
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { NoSSR, useLang, usePageData, withBase } from '@rspress/core/runtime';
|
2
1
|
import { type MouseEvent, useCallback, useState } from 'react';
|
2
|
+
import { NoSSR, useLang, usePageData, withBase } from 'rspress/runtime';
|
3
3
|
import MobileOperation from './common/mobile-operation';
|
4
4
|
import IconCode from './icons/Code';
|
5
5
|
|
@@ -1,10 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
NoSSR,
|
3
|
-
usePageData,
|
4
|
-
useWindowSize,
|
5
|
-
withBase,
|
6
|
-
} from '@rspress/core/runtime';
|
7
1
|
import { useCallback, useEffect, useState } from 'react';
|
2
|
+
import { NoSSR, usePageData, useWindowSize, withBase } from 'rspress/runtime';
|
8
3
|
// @ts-ignore
|
9
4
|
import { normalizeId } from '../../dist/utils';
|
10
5
|
import MobileOperation from './common/mobile-operation';
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { useLang } from '@rspress/core/runtime';
|
2
1
|
import { QRCodeSVG } from 'qrcode.react';
|
3
2
|
import {
|
4
3
|
type MouseEventHandler,
|
@@ -7,6 +6,7 @@ import {
|
|
7
6
|
useRef,
|
8
7
|
useState,
|
9
8
|
} from 'react';
|
9
|
+
import { useLang } from 'rspress/runtime';
|
10
10
|
import IconLaunch from '../icons/Launch';
|
11
11
|
import IconQrcode from '../icons/Qrcode';
|
12
12
|
import IconRefresh from '../icons/Refresh';
|