wildpig 1.3.11 → 1.3.13
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/package.json +1 -1
- package/public/render.tsx +1 -4
- package/scripts/WildPig.tsx +1 -1
- package/scripts/packageStatic.ts +1 -3
package/package.json
CHANGED
package/public/render.tsx
CHANGED
|
@@ -2,13 +2,10 @@ import { createRoot, hydrateRoot } from 'react-dom/client';
|
|
|
2
2
|
import { RouterProvider } from 'react-router';
|
|
3
3
|
import { serverDataStore } from '../store/serverDataStore';
|
|
4
4
|
import { browserRouter } from '../router/index.js';
|
|
5
|
+
import "./tailwindcss4.js"
|
|
5
6
|
|
|
6
7
|
const isDev = process.env.NODE_ENV === 'development';
|
|
7
8
|
|
|
8
|
-
if(typeof window !== 'undefined'){
|
|
9
|
-
await import("./tailwindcss4.js"!);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
9
|
|
|
13
10
|
// 确保在 DOM 加载完成后才进行水合
|
|
14
11
|
document?.addEventListener("DOMContentLoaded", () => {
|
package/scripts/WildPig.tsx
CHANGED
|
@@ -45,7 +45,7 @@ export const startServer = () => {
|
|
|
45
45
|
"content-type": "image/x-icon",
|
|
46
46
|
}
|
|
47
47
|
}),
|
|
48
|
-
"/render.js": () => new Response((readFileSync("
|
|
48
|
+
"/render.js": () => new Response((readFileSync("./public/render.js")), {
|
|
49
49
|
headers: {
|
|
50
50
|
"Content-Type": "text/javascript; charset=utf-8",
|
|
51
51
|
"Cache-Control": isDev ? "no-cache" : "public, max-age=31536000, immutable"
|
package/scripts/packageStatic.ts
CHANGED
|
@@ -6,9 +6,7 @@ const __dirname = import.meta.dirname;
|
|
|
6
6
|
|
|
7
7
|
export const packageStatic = async () => {
|
|
8
8
|
const targetPublicPath = "./dist/public";
|
|
9
|
-
if(fs.existsSync(targetPublicPath)) {
|
|
10
|
-
fs.rmSync(targetPublicPath, { recursive: true });
|
|
11
|
-
}
|
|
9
|
+
if(fs.existsSync(targetPublicPath)) fs.rmSync(targetPublicPath, { recursive: true });
|
|
12
10
|
fs.mkdirSync(targetPublicPath, {recursive: true});
|
|
13
11
|
/** 打包js */
|
|
14
12
|
await Bun.build({
|