Skip to content

Commit

Permalink
fix: scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
takurinton committed Sep 26, 2023
1 parent be14da7 commit 78d480f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "yarn prebuild && wmr",
"build": "tsc && NODE_ENV=production && pnpm run prebuild && wmr build && pnpm run prerender && node ./scripts/make-feed.js",
"dev": "bun run prebuild && wmr",
"build": "tsc && NODE_ENV=production && bun run prebuild && wmr build --prerender && bun run make-feed",
"serve": "wmr serve",
"lint": "eslint './**/*.{js,jsx,ts,tsx}'",
"gen": "node ./scripts/gen-template.js",
"prebuild": "node ./scripts/pre-build.js",
"prerender": "node ./scripts/prerender.js"
"gen": "bun run ./scripts/gen-template.js",
"prebuild": "bun run ./scripts/pre-build.js",
"make-feed": "bun run ./scripts/make-feed.js"
},
"alias": {
"react": "preact/compat"
Expand Down
3 changes: 0 additions & 3 deletions public/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ if (typeof window !== "undefined") {
hydrate(<App />, document.body);
}

// MEMO:
// build を置き換えても wmr を剥がすまでは prerender 関数は残しておく
// そうしないと meta タグがうまく取れない、ここの仕組みに関しては後で考える
export async function prerender() {
return (await import("./prerender.js")).prerender(<App />);
}
Expand Down

0 comments on commit 78d480f

Please sign in to comment.