version: '3'
services:
  app:
    build: .
    command: yarn dev
    ports:
      - "3000:3000"
    volumes:
      - .:/app:cached
      - node_modules:/app/node_modules
      - npm_cache:/root/.npm
      - yarn_cache:/usr/local/share/.cache/yarn
volumes:
  node_modules:
  npm_cache:
  yarn_cache:

version: '3'
services:
  app:
    build: .
    command: yarn dev
    ports:
      - "3000:3000"
    volumes:
      - .:/app:cached
      - node_modules:/app/node_modules
      - npm_cache:/root/.npm
      - yarn_cache:/usr/local/share/.cache/yarn
    tmpfs:
      - /app/dist
volumes:
  node_modules:
  npm_cache:
  yarn_cache:

Use a tmpfs for dist directory
Use a tmpfs for dist directory

Should make builds a little faster
