Skip to content

Commit

Permalink
Merge pull request #628 from jiphyeonjeon-42/develop
Browse files Browse the repository at this point in the history
fix: `info/*` 로 직접접근하면 깨지는 버그 핫픽스
  • Loading branch information
YeonSeong-Lee authored Oct 4, 2024
2 parents d5a413c + 0a63085 commit e8b8123
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,35 +21,35 @@ export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), "");
const port = parseInt(env.PORT, 10);
// TODO: 추후 모든 책들의 id 추가. /info/*
const pagesForPrerender = ["/"];
// const pagesForPrerender = ["/"];

return {
/** @see https://vitejs.dev/plugins/ */
plugins: [
react(),
tsconfigPaths(),
prerender({
routes: pagesForPrerender,
renderer: "@prerenderer/renderer-puppeteer",
server: {
"host": 'localhost',
"port": port,
"listenHost": 'localhost',
},
rendererOptions: {
maxConcurrentRoutes: 1,
renderAfterTime: 5000,
// prerender({
// routes: pagesForPrerender,
// renderer: "@prerenderer/renderer-puppeteer",
// server: {
// "host": 'localhost',
// "port": port,
// "listenHost": 'localhost',
// },
// rendererOptions: {
// maxConcurrentRoutes: 1,
// renderAfterTime: 5000,

},
postProcess(renderedRoute) {
renderedRoute.html = renderedRoute.html
.replace(/http:/i, "https:")
.replace(
/(https:\/\/)?(localhost|127\.0\.0\.1):\d*/i,
"https://42library.kr",
);
},
}),
// },
// postProcess(renderedRoute) {
// renderedRoute.html = renderedRoute.html
// .replace(/http:/i, "https:")
// .replace(
// /(https:\/\/)?(localhost|127\.0\.0\.1):\d*/i,
// "https://42library.kr",
// );
// },
// }),
],

envPrefix,
Expand Down

0 comments on commit e8b8123

Please sign in to comment.