vite-react-ssg 0.8.0-beta.1 → 0.8.0-beta.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/node/cli.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
  const kolorist = require('kolorist');
4
4
  const yargs = require('yargs');
5
5
  const helpers = require('yargs/helpers');
6
- const dev = require('../shared/vite-react-ssg.sc14Rk9F.cjs');
6
+ const dev = require('../shared/vite-react-ssg.Dyp0kt3B.cjs');
7
7
  const webFetch = require('@remix-run/web-fetch');
8
8
  require('node:path');
9
9
  require('node:module');
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.CZ2uxKni.mjs';
4
+ import { b as build, d as dev } from '../shared/vite-react-ssg.BoLst82g.mjs';
5
5
  import { Headers, Request, Response, fetch, FormData } from '@remix-run/web-fetch';
6
6
  import 'node:path';
7
7
  import 'node:module';
package/dist/node.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const dev = require('./shared/vite-react-ssg.sc14Rk9F.cjs');
3
+ const dev = require('./shared/vite-react-ssg.Dyp0kt3B.cjs');
4
4
  require('node:path');
5
5
  require('node:module');
6
6
  require('kolorist');
package/dist/node.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { b as build, d as dev } from './shared/vite-react-ssg.CZ2uxKni.mjs';
1
+ export { b as build, d as dev } from './shared/vite-react-ssg.BoLst82g.mjs';
2
2
  import 'node:path';
3
3
  import 'node:module';
4
4
  import 'kolorist';
@@ -15,7 +15,7 @@ import { once } from 'node:events';
15
15
  import { c as convertRoutesToDataRoutes } from './vite-react-ssg.C0y5wbxl.mjs';
16
16
  import { M as META_CONTAINER_ID } from './vite-react-ssg.4y2OEiyV.mjs';
17
17
 
18
- const version = "0.8.0-beta.1";
18
+ const version = "0.8.0-beta.2";
19
19
 
20
20
  function buildLog(text, count) {
21
21
  console.log(`
@@ -979,20 +979,27 @@ ${err.stack}`
979
979
  const { jsdomGlobal } = await import('../chunks/jsdomGlobal.mjs');
980
980
  jsdomGlobal();
981
981
  }
982
- viteServer = await createServer({
983
- ...viteConfig,
984
- plugins: [
985
- ...viteConfig.plugins ?? [],
986
- ssrServerPlugin({
987
- template,
988
- ssrEntry,
989
- onBeforePageRender,
990
- onPageRendered,
991
- entry,
992
- rootContainerId
993
- })
994
- ]
995
- });
982
+ viteServer = await createServer(
983
+ mergeConfig(
984
+ {
985
+ ...viteConfig,
986
+ plugins: [
987
+ ...viteConfig.plugins ?? [],
988
+ ssrServerPlugin({
989
+ template,
990
+ ssrEntry,
991
+ onBeforePageRender,
992
+ onPageRendered,
993
+ entry,
994
+ rootContainerId
995
+ })
996
+ ]
997
+ },
998
+ {
999
+ ssr: { noExternal: ["vite-react-ssg"] }
1000
+ }
1001
+ )
1002
+ );
996
1003
  await viteServer.listen();
997
1004
  printServerInfo(viteServer, !!customOptions);
998
1005
  viteServer.bindCLIShortcuts({ print: true });
@@ -23,7 +23,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
23
23
  const PQueue__default = /*#__PURE__*/_interopDefaultCompat(PQueue);
24
24
  const fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
25
25
 
26
- const version = "0.8.0-beta.1";
26
+ const version = "0.8.0-beta.2";
27
27
 
28
28
  function buildLog(text, count) {
29
29
  console.log(`
@@ -775,7 +775,7 @@ async function build(ssgOptions = {}, viteConfig = {}) {
775
775
  const ext = format === "esm" ? ".mjs" : ".cjs";
776
776
  const serverEntry = node_path.join(prefix, ssgOut, node_path.parse(ssrEntry).name + ext);
777
777
  const serverManifest = JSON.parse(await fs__default.readFile(node_path.join(ssgOut, ...dotVitedir, "manifest.json"), "utf-8"));
778
- const _require = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared/vite-react-ssg.sc14Rk9F.cjs', document.baseURI).href)));
778
+ const _require = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared/vite-react-ssg.Dyp0kt3B.cjs', document.baseURI).href)));
779
779
  const { createRoot, includedRoutes: serverEntryIncludedRoutes } = format === "esm" ? await import(serverEntry) : _require(serverEntry);
780
780
  const includedRoutes = serverEntryIncludedRoutes || configIncludedRoutes;
781
781
  const { routes } = await createRoot(false);
@@ -987,20 +987,27 @@ ${err.stack}`
987
987
  const { jsdomGlobal } = await import('../chunks/jsdomGlobal.cjs');
988
988
  jsdomGlobal();
989
989
  }
990
- viteServer = await vite.createServer({
991
- ...viteConfig,
992
- plugins: [
993
- ...viteConfig.plugins ?? [],
994
- ssrServerPlugin({
995
- template,
996
- ssrEntry,
997
- onBeforePageRender,
998
- onPageRendered,
999
- entry,
1000
- rootContainerId
1001
- })
1002
- ]
1003
- });
990
+ viteServer = await vite.createServer(
991
+ vite.mergeConfig(
992
+ {
993
+ ...viteConfig,
994
+ plugins: [
995
+ ...viteConfig.plugins ?? [],
996
+ ssrServerPlugin({
997
+ template,
998
+ ssrEntry,
999
+ onBeforePageRender,
1000
+ onPageRendered,
1001
+ entry,
1002
+ rootContainerId
1003
+ })
1004
+ ]
1005
+ },
1006
+ {
1007
+ ssr: { noExternal: ["vite-react-ssg"] }
1008
+ }
1009
+ )
1010
+ );
1004
1011
  await viteServer.listen();
1005
1012
  printServerInfo(viteServer, !!customOptions);
1006
1013
  viteServer.bindCLIShortcuts({ print: true });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vite-react-ssg",
3
3
  "type": "module",
4
- "version": "0.8.0-beta.1",
4
+ "version": "0.8.0-beta.2",
5
5
  "packageManager": "pnpm@9.10.0",
6
6
  "description": "Static-site generation for React on Vite.",
7
7
  "author": "Riri <Daydreamerriri@outlook.com>",