Skip to content

Commit

Permalink
build: 仮想環境下でのホットリロードの動作に必要な変更
Browse files Browse the repository at this point in the history
  • Loading branch information
the-bears-field committed Apr 12, 2024
1 parent 0659081 commit c9c2b15
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 2 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ services:
build:
context: .
dockerfile: docker/frontend/Dockerfile
environment:
- CHOKIDAR_USEPOLLING=true
volumes:
- ./frontend:/usr/src/app
command: yarn dev
Expand Down
17 changes: 15 additions & 2 deletions frontend/next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
/** @type {import('next').NextConfig} */
const nextConfig = {}
const nextConfig = {
reactStrictMode: true,

module.exports = nextConfig
// hot reload
webpack: (config) => {
config.watchOptions = {
poll: 1200, //チェック時間
aggregateTimeout: 500, // 遅延時間
ignored: ["node_modules"],
};

return config;
},
};

module.exports = nextConfig;

0 comments on commit c9c2b15

Please sign in to comment.