diff --git a/compose.yaml b/compose.yaml index 911d004..3af36d0 100644 --- a/compose.yaml +++ b/compose.yaml @@ -4,6 +4,8 @@ services: build: context: . dockerfile: docker/frontend/Dockerfile + environment: + - CHOKIDAR_USEPOLLING=true volumes: - ./frontend:/usr/src/app command: yarn dev diff --git a/frontend/next.config.js b/frontend/next.config.js index 767719f..6cd2563 100644 --- a/frontend/next.config.js +++ b/frontend/next.config.js @@ -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;