rsbuild-plugin-react-router 0.0.1 → 0.0.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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @rsbuild/plugin-react-router
1
+ # rsbuild-plugin-react-router
2
2
 
3
3
  <p align="center">
4
4
  <a href="https://rsbuild.dev" target="blank"><img src="https://github.com/web-infra-dev/rsbuild/assets/7237365/84abc13e-b620-468f-a90b-dbf28e7e9427" alt="Rsbuild Logo" /></a>
@@ -19,11 +19,11 @@ A Rsbuild plugin that provides seamless integration with React Router, supportin
19
19
  ## Installation
20
20
 
21
21
  ```bash
22
- npm install @rsbuild/plugin-react-router
22
+ npm install rsbuild-plugin-react-router
23
23
  # or
24
- yarn add @rsbuild/plugin-react-router
24
+ yarn add rsbuild-plugin-react-router
25
25
  # or
26
- pnpm add @rsbuild/plugin-react-router
26
+ pnpm add rsbuild-plugin-react-router
27
27
  ```
28
28
 
29
29
  ## Usage
@@ -32,7 +32,7 @@ Add the plugin to your `rsbuild.config.ts`:
32
32
 
33
33
  ```ts
34
34
  import { defineConfig } from '@rsbuild/core';
35
- import { pluginReactRouter } from '@rsbuild/plugin-react-router';
35
+ import { pluginReactRouter } from 'rsbuild-plugin-react-router';
36
36
  import { pluginReact } from '@rsbuild/plugin-react';
37
37
 
38
38
  export default defineConfig(() => {
@@ -208,7 +208,7 @@ The plugin supports two ways to handle server-side rendering:
208
208
  ```ts
209
209
  // rsbuild.config.ts
210
210
  import { defineConfig } from '@rsbuild/core';
211
- import { pluginReactRouter } from '@rsbuild/plugin-react-router';
211
+ import { pluginReactRouter } from 'rsbuild-plugin-react-router';
212
212
  import { pluginReact } from '@rsbuild/plugin-react';
213
213
 
214
214
  export default defineConfig(() => {
@@ -331,7 +331,7 @@ To deploy your React Router app to Cloudflare Workers:
331
331
  ```ts
332
332
  import { defineConfig } from '@rsbuild/core';
333
333
  import { pluginReact } from '@rsbuild/plugin-react';
334
- import { pluginReactRouter } from '@rsbuild/plugin-react-router';
334
+ import { pluginReactRouter } from 'rsbuild-plugin-react-router';
335
335
 
336
336
  export default defineConfig({
337
337
  environments: {
package/dist/index.cjs CHANGED
@@ -302,7 +302,8 @@ export { ${output.exports.map((exp)=>'default' === exp ? 'defaultExport as defau
302
302
  name: 'rsbuild:react-router',
303
303
  async setup (api) {
304
304
  var options1;
305
- let clientStats, pluginOptions = {
305
+ let clientStats;
306
+ let pluginOptions = {
306
307
  customServer: !1,
307
308
  serverOutput: 'module',
308
309
  ...options
@@ -408,7 +409,6 @@ export { ${output.exports.map((exp)=>'default' === exp ? 'defaultExport as defau
408
409
  const entryServer = new Proxy({}, {
409
410
  get: (target, prop) => {
410
411
 
411
- console.log(prop);
412
412
  if (entryServerModule) {
413
413
  return entryServerModule[prop];
414
414
  }
@@ -417,7 +417,6 @@ export { ${output.exports.map((exp)=>'default' === exp ? 'defaultExport as defau
417
417
  return createAsyncHandler(prop);
418
418
  }
419
419
 
420
- return entryServerModule[prop];
421
420
  }
422
421
  });
423
422
 
package/dist/index.js CHANGED
@@ -287,7 +287,8 @@ let pluginReactRouter = (options = {})=>({
287
287
  name: 'rsbuild:react-router',
288
288
  async setup (api) {
289
289
  var options1;
290
- let clientStats, pluginOptions = {
290
+ let clientStats;
291
+ let pluginOptions = {
291
292
  customServer: !1,
292
293
  serverOutput: 'module',
293
294
  ...options
@@ -393,7 +394,6 @@ let pluginReactRouter = (options = {})=>({
393
394
  const entryServer = new Proxy({}, {
394
395
  get: (target, prop) => {
395
396
 
396
- console.log(prop);
397
397
  if (entryServerModule) {
398
398
  return entryServerModule[prop];
399
399
  }
@@ -402,7 +402,6 @@ let pluginReactRouter = (options = {})=>({
402
402
  return createAsyncHandler(prop);
403
403
  }
404
404
 
405
- return entryServerModule[prop];
406
405
  }
407
406
  });
408
407
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rsbuild-plugin-react-router",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "React Router plugin for Rsbuild",
5
5
  "repository": {
6
6
  "type": "git",
@@ -71,9 +71,9 @@
71
71
  "@changesets/cli": "^2.28.1",
72
72
  "@react-router/dev": "^7.4.0",
73
73
  "@react-router/node": "^7.4.0",
74
- "@rsbuild/core": "^1.2.19",
74
+ "@rsbuild/core": "1.3.0-beta.2",
75
75
  "@rslib/core": "^0.5.4",
76
- "@rspack/core": "npm:@rspack-canary/core@1.3.0-canary-ce784815-20250320233859",
76
+ "@rspack/core": "1.3.0-beta.1",
77
77
  "@types/babel__core": "^7.6.8",
78
78
  "@types/babel__generator": "^7.6.8",
79
79
  "@types/babel__traverse": "^7.20.6",
@@ -96,7 +96,7 @@
96
96
  "@rsbuild/config": "1.0.1"
97
97
  },
98
98
  "peerDependencies": {
99
- "@rsbuild/core": "1.x"
99
+ "@rsbuild/core": "^1.3.0"
100
100
  },
101
101
  "publishConfig": {
102
102
  "access": "public",