rsbuild-plugin-react-router 0.0.2 → 0.0.3

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.cjs CHANGED
@@ -327,9 +327,9 @@ export { ${output.exports.map((exp)=>'default' === exp ? 'defaultExport as defau
327
327
  });
328
328
  let jiti = (0, external_jiti_namespaceObject.createJiti)(process.cwd()), { appDirectory = 'app', basename = '/', buildDirectory = 'build', ssr = !0 } = await jiti.import('./react-router.config.ts', {
329
329
  default: !0
330
- }).catch(()=>(console.error('No react-router.config.ts found, using default configuration.'), {})), routesPath = (0, external_pathe_namespaceObject.resolve)(appDirectory, 'routes.ts'), routeConfig = await jiti.import(routesPath, {
330
+ }).catch(()=>(console.error('No react-router.config.ts found, using default configuration.'), {})), routesPath = findEntryFile((0, external_pathe_namespaceObject.resolve)(appDirectory, 'routes')), routeConfig = await jiti.import(routesPath, {
331
331
  default: !0
332
- }).catch((error)=>(console.error('Failed to load routes.ts:', error), console.error('No routes.ts found in app directory.'), [])), entryClientPath = findEntryFile((0, external_pathe_namespaceObject.resolve)(appDirectory, 'entry.client')), entryServerPath = findEntryFile((0, external_pathe_namespaceObject.resolve)(appDirectory, 'entry.server')), serverAppPath = findEntryFile((0, external_pathe_namespaceObject.resolve)(appDirectory, '../server/index')), hasServerApp = (0, external_node_fs_namespaceObject.existsSync)(serverAppPath), templateDir = (0, external_pathe_namespaceObject.resolve)(__dirname, 'templates'), templateClientPath = (0, external_pathe_namespaceObject.resolve)(templateDir, 'entry.client.js'), templateServerPath = (0, external_pathe_namespaceObject.resolve)(templateDir, 'entry.server.js'), finalEntryClientPath = (0, external_node_fs_namespaceObject.existsSync)(entryClientPath) ? entryClientPath : templateClientPath, finalEntryServerPath = (0, external_node_fs_namespaceObject.existsSync)(entryServerPath) ? entryServerPath : templateServerPath, routes = {
332
+ }).catch((error)=>(console.error('Failed to load routes file:', error), console.error('No routes file found in app directory.'), [])), entryClientPath = findEntryFile((0, external_pathe_namespaceObject.resolve)(appDirectory, 'entry.client')), entryServerPath = findEntryFile((0, external_pathe_namespaceObject.resolve)(appDirectory, 'entry.server')), serverAppPath = findEntryFile((0, external_pathe_namespaceObject.resolve)(appDirectory, '../server/index')), hasServerApp = (0, external_node_fs_namespaceObject.existsSync)(serverAppPath), templateDir = (0, external_pathe_namespaceObject.resolve)(__dirname, 'templates'), templateClientPath = (0, external_pathe_namespaceObject.resolve)(templateDir, 'entry.client.js'), templateServerPath = (0, external_pathe_namespaceObject.resolve)(templateDir, 'entry.server.js'), finalEntryClientPath = (0, external_node_fs_namespaceObject.existsSync)(entryClientPath) ? entryClientPath : templateClientPath, finalEntryServerPath = (0, external_node_fs_namespaceObject.existsSync)(entryServerPath) ? entryServerPath : templateServerPath, routes = {
333
333
  root: {
334
334
  path: '',
335
335
  id: 'root',
package/dist/index.js CHANGED
@@ -312,9 +312,9 @@ let pluginReactRouter = (options = {})=>({
312
312
  });
313
313
  let jiti = (0, __WEBPACK_EXTERNAL_MODULE_jiti__.createJiti)(process.cwd()), { appDirectory = 'app', basename = '/', buildDirectory = 'build', ssr = !0 } = await jiti.import('./react-router.config.ts', {
314
314
  default: !0
315
- }).catch(()=>(console.error('No react-router.config.ts found, using default configuration.'), {})), routesPath = (0, __WEBPACK_EXTERNAL_MODULE_pathe__.resolve)(appDirectory, 'routes.ts'), routeConfig = await jiti.import(routesPath, {
315
+ }).catch(()=>(console.error('No react-router.config.ts found, using default configuration.'), {})), routesPath = findEntryFile((0, __WEBPACK_EXTERNAL_MODULE_pathe__.resolve)(appDirectory, 'routes')), routeConfig = await jiti.import(routesPath, {
316
316
  default: !0
317
- }).catch((error)=>(console.error('Failed to load routes.ts:', error), console.error('No routes.ts found in app directory.'), [])), entryClientPath = findEntryFile((0, __WEBPACK_EXTERNAL_MODULE_pathe__.resolve)(appDirectory, 'entry.client')), entryServerPath = findEntryFile((0, __WEBPACK_EXTERNAL_MODULE_pathe__.resolve)(appDirectory, 'entry.server')), serverAppPath = findEntryFile((0, __WEBPACK_EXTERNAL_MODULE_pathe__.resolve)(appDirectory, '../server/index')), hasServerApp = (0, __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__.existsSync)(serverAppPath), templateDir = (0, __WEBPACK_EXTERNAL_MODULE_pathe__.resolve)(src_rslib_entry_dirname, 'templates'), templateClientPath = (0, __WEBPACK_EXTERNAL_MODULE_pathe__.resolve)(templateDir, 'entry.client.js'), templateServerPath = (0, __WEBPACK_EXTERNAL_MODULE_pathe__.resolve)(templateDir, 'entry.server.js'), finalEntryClientPath = (0, __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__.existsSync)(entryClientPath) ? entryClientPath : templateClientPath, finalEntryServerPath = (0, __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__.existsSync)(entryServerPath) ? entryServerPath : templateServerPath, routes = {
317
+ }).catch((error)=>(console.error('Failed to load routes file:', error), console.error('No routes file found in app directory.'), [])), entryClientPath = findEntryFile((0, __WEBPACK_EXTERNAL_MODULE_pathe__.resolve)(appDirectory, 'entry.client')), entryServerPath = findEntryFile((0, __WEBPACK_EXTERNAL_MODULE_pathe__.resolve)(appDirectory, 'entry.server')), serverAppPath = findEntryFile((0, __WEBPACK_EXTERNAL_MODULE_pathe__.resolve)(appDirectory, '../server/index')), hasServerApp = (0, __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__.existsSync)(serverAppPath), templateDir = (0, __WEBPACK_EXTERNAL_MODULE_pathe__.resolve)(src_rslib_entry_dirname, 'templates'), templateClientPath = (0, __WEBPACK_EXTERNAL_MODULE_pathe__.resolve)(templateDir, 'entry.client.js'), templateServerPath = (0, __WEBPACK_EXTERNAL_MODULE_pathe__.resolve)(templateDir, 'entry.server.js'), finalEntryClientPath = (0, __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__.existsSync)(entryClientPath) ? entryClientPath : templateClientPath, finalEntryServerPath = (0, __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__.existsSync)(entryServerPath) ? entryServerPath : templateServerPath, routes = {
318
318
  root: {
319
319
  path: '',
320
320
  id: 'root',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rsbuild-plugin-react-router",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "React Router plugin for Rsbuild",
5
5
  "repository": {
6
6
  "type": "git",
@@ -117,6 +117,6 @@
117
117
  "changeset": "changeset",
118
118
  "version": "changeset version",
119
119
  "release": "changeset publish",
120
- "release:local": "pnpm build && changeset version && changeset publish"
120
+ "release:local": "pnpm build && changeset version && changeset publish && git add . && git commit -m \"chore: version packages\" && git push && git push --tags"
121
121
  }
122
122
  }