diff --git a/application/README.md b/application/README.md index f03680422d..d91813f87b 100644 --- a/application/README.md +++ b/application/README.md @@ -61,5 +61,5 @@ Playwright で Visual Regression Test (VRT) を提供しています。 ``` - リモート環境に対してテストを実行する場合 - ```bash - E2E_BASE_URL=https://web-speed-hackathon-2026.example.com pnpm run test + E2E_BASE_URL=https://pr-269-web-speed-hackathon-2026.fly.dev pnpm run test ``` diff --git a/application/client/babel.config.js b/application/client/babel.config.js index c3c574591a..c222e03d07 100644 --- a/application/client/babel.config.js +++ b/application/client/babel.config.js @@ -13,7 +13,7 @@ module.exports = { [ "@babel/preset-react", { - development: true, + development: false, runtime: "automatic", }, ], diff --git a/application/client/package.json b/application/client/package.json index 9f8e80a6a8..af2d3a5156 100644 --- a/application/client/package.json +++ b/application/client/package.json @@ -5,7 +5,7 @@ "license": "MPL-2.0", "author": "CyberAgent, Inc.", "scripts": { - "build": "NODE_ENV=development webpack", + "build": "NODE_ENV=production webpack", "typecheck": "tsc" }, "dependencies": { diff --git a/application/client/webpack.config.js b/application/client/webpack.config.js index 9fae72647f..77d75f6e88 100644 --- a/application/client/webpack.config.js +++ b/application/client/webpack.config.js @@ -25,7 +25,7 @@ const config = { ], static: [PUBLIC_PATH, UPLOAD_PATH], }, - devtool: "inline-source-map", + devtool: false, entry: { main: [ "core-js", @@ -36,7 +36,7 @@ const config = { path.resolve(SRC_PATH, "./index.tsx"), ], }, - mode: "none", + mode: "production", module: { rules: [ { @@ -77,7 +77,7 @@ const config = { BUILD_DATE: new Date().toISOString(), // Heroku では SOURCE_VERSION 環境変数から commit hash を参照できます COMMIT_HASH: process.env.SOURCE_VERSION || "", - NODE_ENV: "development", + NODE_ENV: "production", }), new MiniCssExtractPlugin({ filename: "styles/[name].css", @@ -128,7 +128,7 @@ const config = { }, }, optimization: { - minimize: false, + minimize: true, splitChunks: false, concatenateModules: false, usedExports: false, diff --git a/application/server/src/routes/api/crok.ts b/application/server/src/routes/api/crok.ts index cfd6065951..bdd9ad87fb 100644 --- a/application/server/src/routes/api/crok.ts +++ b/application/server/src/routes/api/crok.ts @@ -34,15 +34,13 @@ crokRouter.get("/crok", async (req, res) => { let messageId = 0; // TTFT (Time to First Token) - await sleep(3000); - for (const char of response) { if (res.closed) break; const data = JSON.stringify({ text: char, done: false }); res.write(`event: message\nid: ${messageId++}\ndata: ${data}\n\n`); - await sleep(10); + await sleep(1); } if (!res.closed) {