S
SolidJS6mo ago
gitinit

HMR briefly updates before reverting in docker container.

I'm trying to setup a devcontainer but I'm having one really weird issue. When I make a change the app will briefly reflect the change before reverting. I have attached a gif showing this behavior. Below are my docker and solidstart configs. The browser logs are empty and as you can see there isn't anything in the server logs that can't be gleamed from the behavior. Any idea on how to fix this issue or any thoughts on what I should do next troubleshooting wise? Notes: * The "app" service is the one that solidstart is running on. * The "devcontainer" script is simply pnpm install --shamefully-hoist && vinxi dev docker-compose.yml:
version: '3'

services:
devcontainer:
build:
context: .
dockerfile: Dockerfile

volumes:
- ../:/workspaces/burchill-dev
- /workspaces/burchill-dev/clients/web/node_modules

# Overrides default command so things don't shut down after the process ends.
entrypoint: /usr/local/share/docker-init.sh
command: sleep infinity

app:
build:
context: ../clients/web
dockerfile: Dockerfile
volumes:
- ../clients/web:/root/web
- /root/web/node_modules
ports:
- 3000:3000
- 4000:4000
version: '3'

services:
devcontainer:
build:
context: .
dockerfile: Dockerfile

volumes:
- ../:/workspaces/burchill-dev
- /workspaces/burchill-dev/clients/web/node_modules

# Overrides default command so things don't shut down after the process ends.
entrypoint: /usr/local/share/docker-init.sh
command: sleep infinity

app:
build:
context: ../clients/web
dockerfile: Dockerfile
volumes:
- ../clients/web:/root/web
- /root/web/node_modules
ports:
- 3000:3000
- 4000:4000
Dockerfile:
FROM node:lts

RUN npm install -g pnpm
RUN pnpm config set store-dir /.pnpm-store

WORKDIR /root/web

EXPOSE 3000
EXPOSE 4000

CMD ["pnpm", "devcontainer"]
FROM node:lts

RUN npm install -g pnpm
RUN pnpm config set store-dir /.pnpm-store

WORKDIR /root/web

EXPOSE 3000
EXPOSE 4000

CMD ["pnpm", "devcontainer"]
app.config.ts:
import { defineConfig } from "@solidjs/start/config";

export default defineConfig({
vite ({ router }) {
if (router === "client") {
return {
server: {
hmr: {
port: 4000,
},
watch: {
usePolling: true,
}
},
};
}
return {};
}
});
import { defineConfig } from "@solidjs/start/config";

export default defineConfig({
vite ({ router }) {
if (router === "client") {
return {
server: {
hmr: {
port: 4000,
},
watch: {
usePolling: true,
}
},
};
}
return {};
}
});
No description
3 Replies
bigmistqke
bigmistqke6mo ago
Looks like a similar bug then the other hmr bug u commented on. if I would be you I would make a new gh-issue for it.
gitinit
gitinit6mo ago
Okay, I filed an issue on Github. Through further testing this problem seems so only happen on Windows. I created a minimal repo for it and when I tried it on my Macbook it worked as expected. Really confusing. https://github.com/solidjs/solid-start/issues/1407
GitHub
[Bug?]: HMR briefly updates before reverting in docker container wi...
Duplicates I have searched the existing issues Latest version I have tested the latest version Current behavior 😯 When I make a change to my source code, the web page updates briefly to reflect my ...
bigmistqke
bigmistqke6mo ago
thanks appreciate the effort.
Want results from more Discord servers?
Add your server