Hot reload take long time and not working for viz-lib

Issue Summary

Hey there,
I’m trying to work on a local env using docker and work on the frontend from a separate container using this image:

FROM node:14.17

# Install global dependencies
RUN npm install --global --force yarn@1.22.10

# Copy app files
WORKDIR /frontend
COPY --chown=redash package.json yarn.lock .yarnrc /frontend/
COPY --chown=redash ./client /frontend/client
COPY --chown=redash ./viz-lib /frontend/viz-lib

# Install dependencies
RUN yarn install
RUN cd viz-lib && yarn install
RUN yarn build:viz
ENV PATH /usr/node_modules/.bin:/frontend/node_modules/.bin:$PATH

# Start the main process.
CMD yarn build

and docker-compose config:

frontend-builder:
    build:
      context: .
      dockerfile: Dockerfile path
    volumes:
      - ./package.json:/frontend/package.json
      - ./yarn.lock:/frontend/yarn.lock
      - ./.yarnrc:/frontend/.yarnrc
      - ./.yarn:/frontend/.yarn
      - ./webpack.config.js:/frontend/webpack.config.js
      - ./client:/frontend/client
      - ./viz-lib:/frontend/viz-lib
    env_file:
      - .env
    command: yarn start
    ports:
      - "8080:8080"

package.json is same as in master branch.

After encountering many errors, I’ve managed to build the env and am able to start working on the client.

The issues I currently face:

  1. Hot reload works on file in Client but not on files in viz-lib.
  2. It takes Webpack to compile about 2-3 minutes with vendors~app.js at around 30-40MiB and app.js about 6MiB

Any idea how I can improve this so I can work on the client and the viz-lib files? :slight_smile:
Thanks!

Technical details:

  • Redash Version: 11.0.0-dev
  • Browser/OS: Chrome, Win 11
  • How did you install Redash: With docker by this guide

Solved.
To anyone that comes across this issue, make sure your not installing or running with WSL.

That seemed to have cause the issue and when re installing and running with bash, everything works smoothly.

1 Like