vite-react-ssg 0.7.2 → 0.7.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/README.md +3 -3
- package/dist/client/single-page.d.cts +2 -2
- package/dist/client/single-page.d.mts +2 -2
- package/dist/client/single-page.d.ts +2 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/node.cjs +1 -10
- package/dist/node.d.cts +1 -1
- package/dist/node.d.mts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.mjs +1 -10
- package/dist/shared/{vite-react-ssg.4d155759.d.cts → vite-react-ssg.de54c34e.d.cts} +1 -1
- package/dist/shared/{vite-react-ssg.4d155759.d.mts → vite-react-ssg.de54c34e.d.mts} +1 -1
- package/dist/shared/{vite-react-ssg.4d155759.d.ts → vite-react-ssg.de54c34e.d.ts} +1 -1
- package/package.json +12 -14
package/README.md
CHANGED
|
@@ -459,9 +459,9 @@ interface ViteReactSSGOptions {
|
|
|
459
459
|
*
|
|
460
460
|
* @default 'none'
|
|
461
461
|
*/
|
|
462
|
-
formatting?: '
|
|
462
|
+
formatting?: 'prettify' | 'none'
|
|
463
463
|
/**
|
|
464
|
-
* Vite
|
|
464
|
+
* Vite environment mode.
|
|
465
465
|
*/
|
|
466
466
|
mode?: string
|
|
467
467
|
/**
|
|
@@ -475,7 +475,7 @@ interface ViteReactSSGOptions {
|
|
|
475
475
|
dirStyle?: 'flat' | 'nested'
|
|
476
476
|
/**
|
|
477
477
|
* Generate for all routes, including dynamic routes.
|
|
478
|
-
* If enabled, you will need to
|
|
478
|
+
* If enabled, you will need to configure your serve
|
|
479
479
|
* manually to handle dynamic routes properly.
|
|
480
480
|
*
|
|
481
481
|
* @default false
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { V as ViteReactSSGContext, a as ViteReactSSGClientOptions } from '../shared/vite-react-ssg.
|
|
3
|
-
export { I as IndexRouteRecord, N as NonIndexRouteRecord, R as RouteRecord, c as RouterOptions, S as StyleCollector, b as ViteReactSSGOptions } from '../shared/vite-react-ssg.
|
|
2
|
+
import { V as ViteReactSSGContext, a as ViteReactSSGClientOptions } from '../shared/vite-react-ssg.de54c34e.cjs';
|
|
3
|
+
export { I as IndexRouteRecord, N as NonIndexRouteRecord, R as RouteRecord, c as RouterOptions, S as StyleCollector, b as ViteReactSSGOptions } from '../shared/vite-react-ssg.de54c34e.cjs';
|
|
4
4
|
export { C as ClientOnly, H as Head } from '../shared/vite-react-ssg.faf3855a.cjs';
|
|
5
5
|
import 'critters';
|
|
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.
|
|
3
|
-
export { I as IndexRouteRecord, N as NonIndexRouteRecord, R as RouteRecord, c as RouterOptions, S as StyleCollector, b as ViteReactSSGOptions } from '../shared/vite-react-ssg.
|
|
2
|
+
import { V as ViteReactSSGContext, a as ViteReactSSGClientOptions } from '../shared/vite-react-ssg.de54c34e.mjs';
|
|
3
|
+
export { I as IndexRouteRecord, N as NonIndexRouteRecord, R as RouteRecord, c as RouterOptions, S as StyleCollector, b as ViteReactSSGOptions } from '../shared/vite-react-ssg.de54c34e.mjs';
|
|
4
4
|
export { C as ClientOnly, H as Head } from '../shared/vite-react-ssg.faf3855a.mjs';
|
|
5
5
|
import 'critters';
|
|
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.
|
|
3
|
-
export { I as IndexRouteRecord, N as NonIndexRouteRecord, R as RouteRecord, c as RouterOptions, S as StyleCollector, b as ViteReactSSGOptions } from '../shared/vite-react-ssg.
|
|
2
|
+
import { V as ViteReactSSGContext, a as ViteReactSSGClientOptions } from '../shared/vite-react-ssg.de54c34e.js';
|
|
3
|
+
export { I as IndexRouteRecord, N as NonIndexRouteRecord, R as RouteRecord, c as RouterOptions, S as StyleCollector, b as ViteReactSSGOptions } from '../shared/vite-react-ssg.de54c34e.js';
|
|
4
4
|
export { C as ClientOnly, H as Head } from '../shared/vite-react-ssg.faf3855a.js';
|
|
5
5
|
import 'critters';
|
|
6
6
|
import 'react-router-dom';
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as RouterOptions, V as ViteReactSSGContext, a as ViteReactSSGClientOptions } from './shared/vite-react-ssg.
|
|
2
|
-
export { I as IndexRouteRecord, N as NonIndexRouteRecord, R as RouteRecord, S as StyleCollector, b as ViteReactSSGOptions } from './shared/vite-react-ssg.
|
|
1
|
+
import { c as RouterOptions, V as ViteReactSSGContext, a as ViteReactSSGClientOptions } from './shared/vite-react-ssg.de54c34e.cjs';
|
|
2
|
+
export { I as IndexRouteRecord, N as NonIndexRouteRecord, R as RouteRecord, S as StyleCollector, b as ViteReactSSGOptions } from './shared/vite-react-ssg.de54c34e.cjs';
|
|
3
3
|
export { C as ClientOnly, H as Head } from './shared/vite-react-ssg.faf3855a.cjs';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { LinkProps, NavLinkProps } from 'react-router-dom';
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as RouterOptions, V as ViteReactSSGContext, a as ViteReactSSGClientOptions } from './shared/vite-react-ssg.
|
|
2
|
-
export { I as IndexRouteRecord, N as NonIndexRouteRecord, R as RouteRecord, S as StyleCollector, b as ViteReactSSGOptions } from './shared/vite-react-ssg.
|
|
1
|
+
import { c as RouterOptions, V as ViteReactSSGContext, a as ViteReactSSGClientOptions } from './shared/vite-react-ssg.de54c34e.mjs';
|
|
2
|
+
export { I as IndexRouteRecord, N as NonIndexRouteRecord, R as RouteRecord, S as StyleCollector, b as ViteReactSSGOptions } from './shared/vite-react-ssg.de54c34e.mjs';
|
|
3
3
|
export { C as ClientOnly, H as Head } from './shared/vite-react-ssg.faf3855a.mjs';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { LinkProps, NavLinkProps } from 'react-router-dom';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as RouterOptions, V as ViteReactSSGContext, a as ViteReactSSGClientOptions } from './shared/vite-react-ssg.
|
|
2
|
-
export { I as IndexRouteRecord, N as NonIndexRouteRecord, R as RouteRecord, S as StyleCollector, b as ViteReactSSGOptions } from './shared/vite-react-ssg.
|
|
1
|
+
import { c as RouterOptions, V as ViteReactSSGContext, a as ViteReactSSGClientOptions } from './shared/vite-react-ssg.de54c34e.js';
|
|
2
|
+
export { I as IndexRouteRecord, N as NonIndexRouteRecord, R as RouteRecord, S as StyleCollector, b as ViteReactSSGOptions } from './shared/vite-react-ssg.de54c34e.js';
|
|
3
3
|
export { C as ClientOnly, H as Head } from './shared/vite-react-ssg.faf3855a.js';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { LinkProps, NavLinkProps } from 'react-router-dom';
|
package/dist/node.cjs
CHANGED
|
@@ -1391,16 +1391,7 @@ function rewriteScripts(indexHTML, mode) {
|
|
|
1391
1391
|
return indexHTML.replace(/<script type="module" /g, `<script type="module" ${mode} `);
|
|
1392
1392
|
}
|
|
1393
1393
|
async function formatHtml(html, formatting) {
|
|
1394
|
-
if (formatting === "
|
|
1395
|
-
const htmlMinifier = await import('html-minifier');
|
|
1396
|
-
return htmlMinifier.minify(html, {
|
|
1397
|
-
collapseWhitespace: true,
|
|
1398
|
-
caseSensitive: true,
|
|
1399
|
-
collapseInlineTagWhitespace: false,
|
|
1400
|
-
minifyJS: true,
|
|
1401
|
-
minifyCSS: true
|
|
1402
|
-
});
|
|
1403
|
-
} else if (formatting === "prettify") {
|
|
1394
|
+
if (formatting === "prettify") {
|
|
1404
1395
|
try {
|
|
1405
1396
|
const prettier = (await import('prettier/esm/standalone.mjs')).default;
|
|
1406
1397
|
const parserHTML = (await import('prettier/esm/parser-html.mjs')).default;
|
package/dist/node.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InlineConfig } from 'vite';
|
|
2
|
-
import { b as ViteReactSSGOptions } from './shared/vite-react-ssg.
|
|
2
|
+
import { b as ViteReactSSGOptions } from './shared/vite-react-ssg.de54c34e.cjs';
|
|
3
3
|
import 'critters';
|
|
4
4
|
import 'react';
|
|
5
5
|
import 'react-router-dom';
|
package/dist/node.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InlineConfig } from 'vite';
|
|
2
|
-
import { b as ViteReactSSGOptions } from './shared/vite-react-ssg.
|
|
2
|
+
import { b as ViteReactSSGOptions } from './shared/vite-react-ssg.de54c34e.mjs';
|
|
3
3
|
import 'critters';
|
|
4
4
|
import 'react';
|
|
5
5
|
import 'react-router-dom';
|
package/dist/node.d.ts
CHANGED
package/dist/node.mjs
CHANGED
|
@@ -1384,16 +1384,7 @@ function rewriteScripts(indexHTML, mode) {
|
|
|
1384
1384
|
return indexHTML.replace(/<script type="module" /g, `<script type="module" ${mode} `);
|
|
1385
1385
|
}
|
|
1386
1386
|
async function formatHtml(html, formatting) {
|
|
1387
|
-
if (formatting === "
|
|
1388
|
-
const htmlMinifier = await import('html-minifier');
|
|
1389
|
-
return htmlMinifier.minify(html, {
|
|
1390
|
-
collapseWhitespace: true,
|
|
1391
|
-
caseSensitive: true,
|
|
1392
|
-
collapseInlineTagWhitespace: false,
|
|
1393
|
-
minifyJS: true,
|
|
1394
|
-
minifyCSS: true
|
|
1395
|
-
});
|
|
1396
|
-
} else if (formatting === "prettify") {
|
|
1387
|
+
if (formatting === "prettify") {
|
|
1397
1388
|
try {
|
|
1398
1389
|
const prettier = (await import('prettier/esm/standalone.mjs')).default;
|
|
1399
1390
|
const parserHTML = (await import('prettier/esm/parser-html.mjs')).default;
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-react-ssg",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.7.
|
|
5
|
-
"packageManager": "pnpm@9.
|
|
4
|
+
"version": "0.7.3",
|
|
5
|
+
"packageManager": "pnpm@9.7.1",
|
|
6
6
|
"description": "Static-site generation for React on Vite.",
|
|
7
7
|
"author": "Riri <Daydreamerriri@outlook.com>",
|
|
8
8
|
"license": "MIT",
|
|
@@ -102,25 +102,23 @@
|
|
|
102
102
|
"dependencies": {
|
|
103
103
|
"@remix-run/web-fetch": "^4.4.2",
|
|
104
104
|
"fs-extra": "^11.2.0",
|
|
105
|
-
"html-minifier": "^4.0.0",
|
|
106
105
|
"html5parser": "^2.0.2",
|
|
107
|
-
"jsdom": "^24.1.
|
|
106
|
+
"jsdom": "^24.1.1",
|
|
108
107
|
"kolorist": "^1.8.0",
|
|
109
108
|
"react-helmet-async": "^1.3.0",
|
|
110
109
|
"yargs": "^17.7.2"
|
|
111
110
|
},
|
|
112
111
|
"devDependencies": {
|
|
113
112
|
"@ririd/eslint-config": "^1.3.2",
|
|
114
|
-
"@types/fs-extra": "^11.0.
|
|
115
|
-
"@types/
|
|
116
|
-
"@types/
|
|
117
|
-
"@types/node": "^18.15.11",
|
|
113
|
+
"@types/fs-extra": "^11.0.4",
|
|
114
|
+
"@types/jsdom": "^21.1.7",
|
|
115
|
+
"@types/node": "^18.19.44",
|
|
118
116
|
"@types/react": "^18.2.14",
|
|
119
117
|
"@types/react-dom": "^18.2.6",
|
|
120
|
-
"@types/yargs": "^17.0.
|
|
121
|
-
"bumpp": "^9.
|
|
118
|
+
"@types/yargs": "^17.0.33",
|
|
119
|
+
"bumpp": "^9.5.1",
|
|
122
120
|
"critters": "^0.0.22",
|
|
123
|
-
"eslint": "^
|
|
121
|
+
"eslint": "^9.9.0",
|
|
124
122
|
"esno": "^4.7.0",
|
|
125
123
|
"fast-glob": "3.3.2",
|
|
126
124
|
"p-queue": "^8.0.1",
|
|
@@ -130,10 +128,10 @@
|
|
|
130
128
|
"react-router-dom": "^6.15.0",
|
|
131
129
|
"rimraf": "5.0.1",
|
|
132
130
|
"styled-components": "6.0.5",
|
|
133
|
-
"typescript": "^5.5.
|
|
131
|
+
"typescript": "^5.5.4",
|
|
134
132
|
"unbuild": "^2.0.0",
|
|
135
|
-
"vite": "^5.
|
|
136
|
-
"vite-plugin-pwa": "^0.17.
|
|
133
|
+
"vite": "^5.4.1",
|
|
134
|
+
"vite-plugin-pwa": "^0.17.5",
|
|
137
135
|
"vitest": "1.6.0"
|
|
138
136
|
}
|
|
139
137
|
}
|