Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vite config update #3227

Merged
merged 4 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ services:
- "9992:9992"
environment:
- NODE_ENV=development
volumes:
- ./:/srv:rw,z
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
volumes:
- ./:/srv:rw,z

This should be redundant with the app config later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has been removed

depends_on:
node:
condition: service_healthy
Expand Down
4 changes: 4 additions & 0 deletions packages/openneuro-app/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ export default defineConfig({
port: 80,
host: "0.0.0.0",
cors: true,
watch: {
usePolling: true, // Enable polling for file watching
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has a pretty significant performance cost if it isn't needed for a large project like this. Might be better to use these overrides on macOS and document it for developer setup instead.

In .env:

CHOKIDAR_USEPOLLING=true
CHOKIDAR_INTERVAL=1000

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed this from vite.config and added polling config to docker-compose and config.env

interval: 1000, // Set polling interval to 1000ms (1 second)
},
},
build: {
sourcemap: true,
Expand Down
Loading