vite-react-ssg 0.9.0 → 0.9.1-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.
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
- import { V as ViteReactSSGContext, a as ViteReactSSGClientOptions } from '../shared/vite-react-ssg.CHKvDn8n.mjs';
3
- export { C as CrittersOptions, I as IndexRouteRecord, N as NonIndexRouteRecord, R as RouteRecord, b as RouterFutureConfig, c as RouterOptions, S as StyleCollector, d as ViteReactSSGOptions } from '../shared/vite-react-ssg.CHKvDn8n.mjs';
2
+ import { V as ViteReactSSGContext, a as ViteReactSSGClientOptions } from '../shared/vite-react-ssg.jgFXOhqq.mjs';
3
+ export { C as CrittersOptions, I as IndexRouteRecord, N as NonIndexRouteRecord, R as RouteRecord, b as RouterFutureConfig, c as RouterOptions, S as StyleCollector, d as ViteReactSSGOptions } from '../shared/vite-react-ssg.jgFXOhqq.mjs';
4
4
  export { C as ClientOnly, H as Head } from '../shared/vite-react-ssg.-NlgsPvg.mjs';
5
5
  import 'beasties';
6
6
  import 'react-router-dom';
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
- import { V as ViteReactSSGContext, a as ViteReactSSGClientOptions } from '../shared/vite-react-ssg.CHKvDn8n.js';
3
- export { C as CrittersOptions, I as IndexRouteRecord, N as NonIndexRouteRecord, R as RouteRecord, b as RouterFutureConfig, c as RouterOptions, S as StyleCollector, d as ViteReactSSGOptions } from '../shared/vite-react-ssg.CHKvDn8n.js';
2
+ import { V as ViteReactSSGContext, a as ViteReactSSGClientOptions } from '../shared/vite-react-ssg.jgFXOhqq.js';
3
+ export { C as CrittersOptions, I as IndexRouteRecord, N as NonIndexRouteRecord, R as RouteRecord, b as RouterFutureConfig, c as RouterOptions, S as StyleCollector, d as ViteReactSSGOptions } from '../shared/vite-react-ssg.jgFXOhqq.js';
4
4
  export { C as ClientOnly, H as Head } from '../shared/vite-react-ssg.-NlgsPvg.js';
5
5
  import 'beasties';
6
6
  import 'react-router-dom';
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { V as ViteReactSSGContext, c as RouterOptions, a as ViteReactSSGClientOptions } from './shared/vite-react-ssg.CHKvDn8n.mjs';
2
- export { C as CrittersOptions, I as IndexRouteRecord, N as NonIndexRouteRecord, R as RouteRecord, b as RouterFutureConfig, S as StyleCollector, d as ViteReactSSGOptions } from './shared/vite-react-ssg.CHKvDn8n.mjs';
1
+ import { V as ViteReactSSGContext, c as RouterOptions, a as ViteReactSSGClientOptions } from './shared/vite-react-ssg.jgFXOhqq.mjs';
2
+ export { C as CrittersOptions, I as IndexRouteRecord, N as NonIndexRouteRecord, R as RouteRecord, b as RouterFutureConfig, S as StyleCollector, d as ViteReactSSGOptions } from './shared/vite-react-ssg.jgFXOhqq.mjs';
3
3
  export { C as ClientOnly, H as Head } from './shared/vite-react-ssg.-NlgsPvg.mjs';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import 'beasties';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { V as ViteReactSSGContext, c as RouterOptions, a as ViteReactSSGClientOptions } from './shared/vite-react-ssg.CHKvDn8n.js';
2
- export { C as CrittersOptions, I as IndexRouteRecord, N as NonIndexRouteRecord, R as RouteRecord, b as RouterFutureConfig, S as StyleCollector, d as ViteReactSSGOptions } from './shared/vite-react-ssg.CHKvDn8n.js';
1
+ import { V as ViteReactSSGContext, c as RouterOptions, a as ViteReactSSGClientOptions } from './shared/vite-react-ssg.jgFXOhqq.js';
2
+ export { C as CrittersOptions, I as IndexRouteRecord, N as NonIndexRouteRecord, R as RouteRecord, b as RouterFutureConfig, S as StyleCollector, d as ViteReactSSGOptions } from './shared/vite-react-ssg.jgFXOhqq.js';
3
3
  export { C as ClientOnly, H as Head } from './shared/vite-react-ssg.-NlgsPvg.js';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import 'beasties';
package/dist/index.mjs CHANGED
@@ -87,7 +87,8 @@ function ViteReactSSG(routerOptions, fn, options = {}) {
87
87
  const BASE_URL = routerOptions.basename ?? "/";
88
88
  const { v7_startTransition = true, ...routerFeature } = routerOptions.future ?? {};
89
89
  async function createRoot(client = false, routePath) {
90
- const browserRouter = client ? createBrowserRouter(
90
+ const createRouter = routerOptions.customCreateRouter ?? createBrowserRouter;
91
+ const browserRouter = client ? createRouter(
91
92
  convertRoutesToDataRoutes(
92
93
  routerOptions.routes,
93
94
  transformStaticLoaderRoute
package/dist/node/cli.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { gray, bold, red, reset, underline } from 'kolorist';
2
2
  import yargs from 'yargs';
3
3
  import { hideBin } from 'yargs/helpers';
4
- import { b as build, d as dev } from '../shared/vite-react-ssg.DsKK_1op.mjs';
4
+ import { b as build, d as dev } from '../shared/vite-react-ssg.DUkzxBEb.mjs';
5
5
  import 'node:module';
6
6
  import 'node:path';
7
7
  import 'fs-extra';
package/dist/node.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { InlineConfig } from 'vite';
2
- import { d as ViteReactSSGOptions } from './shared/vite-react-ssg.CHKvDn8n.mjs';
2
+ import { d as ViteReactSSGOptions } from './shared/vite-react-ssg.jgFXOhqq.mjs';
3
3
  import 'beasties';
4
4
  import 'react';
5
5
  import 'react-router-dom';
package/dist/node.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { InlineConfig } from 'vite';
2
- import { d as ViteReactSSGOptions } from './shared/vite-react-ssg.CHKvDn8n.js';
2
+ import { d as ViteReactSSGOptions } from './shared/vite-react-ssg.jgFXOhqq.js';
3
3
  import 'beasties';
4
4
  import 'react';
5
5
  import 'react-router-dom';
package/dist/node.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { b as build, d as dev } from './shared/vite-react-ssg.DsKK_1op.mjs';
1
+ export { b as build, d as dev } from './shared/vite-react-ssg.DUkzxBEb.mjs';
2
2
  import 'node:module';
3
3
  import 'node:path';
4
4
  import 'fs-extra';
@@ -355,7 +355,7 @@ class WritableAsPromise extends Writable {
355
355
  }
356
356
  }
357
357
 
358
- const version = "0.9.0";
358
+ const version = "0.9.1-beta.1";
359
359
 
360
360
  function buildLog(text, count) {
361
361
  console.log(`
@@ -204,6 +204,7 @@ interface RouterOptions {
204
204
  routes: RouteRecord[];
205
205
  basename?: string;
206
206
  future?: Partial<RouterFutureConfig & FutureConfig>;
207
+ customCreateRouter?: typeof createBrowserRouter;
207
208
  }
208
209
  interface StyleCollector {
209
210
  collect: (app: ReactElement) => ReactElement;
@@ -204,6 +204,7 @@ interface RouterOptions {
204
204
  routes: RouteRecord[];
205
205
  basename?: string;
206
206
  future?: Partial<RouterFutureConfig & FutureConfig>;
207
+ customCreateRouter?: typeof createBrowserRouter;
207
208
  }
208
209
  interface StyleCollector {
209
210
  collect: (app: ReactElement) => ReactElement;
@@ -1,6 +1,6 @@
1
1
  import { AnyRouter } from '@tanstack/react-router';
2
- import { V as ViteReactSSGContext$1, a as ViteReactSSGClientOptions } from './shared/vite-react-ssg.CHKvDn8n.mjs';
3
- export { C as CrittersOptions, I as IndexRouteRecord, N as NonIndexRouteRecord, R as RouteRecord, b as RouterFutureConfig, S as StyleCollector, d as ViteReactSSGOptions } from './shared/vite-react-ssg.CHKvDn8n.mjs';
2
+ import { V as ViteReactSSGContext$1, a as ViteReactSSGClientOptions } from './shared/vite-react-ssg.jgFXOhqq.mjs';
3
+ export { C as CrittersOptions, I as IndexRouteRecord, N as NonIndexRouteRecord, R as RouteRecord, b as RouterFutureConfig, S as StyleCollector, d as ViteReactSSGOptions } from './shared/vite-react-ssg.jgFXOhqq.mjs';
4
4
  export { C as ClientOnly, H as Head } from './shared/vite-react-ssg.-NlgsPvg.mjs';
5
5
  import 'beasties';
6
6
  import 'react';
@@ -1,6 +1,6 @@
1
1
  import { AnyRouter } from '@tanstack/react-router';
2
- import { V as ViteReactSSGContext$1, a as ViteReactSSGClientOptions } from './shared/vite-react-ssg.CHKvDn8n.js';
3
- export { C as CrittersOptions, I as IndexRouteRecord, N as NonIndexRouteRecord, R as RouteRecord, b as RouterFutureConfig, S as StyleCollector, d as ViteReactSSGOptions } from './shared/vite-react-ssg.CHKvDn8n.js';
2
+ import { V as ViteReactSSGContext$1, a as ViteReactSSGClientOptions } from './shared/vite-react-ssg.jgFXOhqq.js';
3
+ export { C as CrittersOptions, I as IndexRouteRecord, N as NonIndexRouteRecord, R as RouteRecord, b as RouterFutureConfig, S as StyleCollector, d as ViteReactSSGOptions } from './shared/vite-react-ssg.jgFXOhqq.js';
4
4
  export { C as ClientOnly, H as Head } from './shared/vite-react-ssg.-NlgsPvg.js';
5
5
  import 'beasties';
6
6
  import 'react';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vite-react-ssg",
3
3
  "type": "module",
4
- "version": "0.9.0",
4
+ "version": "0.9.1-beta.1",
5
5
  "packageManager": "pnpm@10.28.2",
6
6
  "description": "Static-site generation for React on Vite.",
7
7
  "author": "Riri <Daydreamerriri@outlook.com>",