Skip to content

refactor(vite): ignore docs in dev and preview folders - #186

Merged
Ryan-Millard merged 3 commits into
Ryan-Millard:mainfrom
laxitajain:refactor/ignore-docs
Jan 2, 2026
Merged

refactor(vite): ignore docs in dev and preview folders#186
Ryan-Millard merged 3 commits into
Ryan-Millard:mainfrom
laxitajain:refactor/ignore-docs

Conversation

@laxitajain

@laxitajain laxitajain commented Jan 2, 2026

Copy link
Copy Markdown
Contributor

⚠️ Are you using the correct pull request template?
Please choose one of the following:

If none of these fit, you may use this default to describe your change manually.

If this is the right template, go ahead and complete it below 👇


📌 Description

This PR updates the root Vite configuration to fully ignore the docs/ directory during development and preview workflows.

Previously, Vite would watch files under docs/build, causing unnecessary reloads, increased CPU usage, and noisy console output when running the root app.

Changes

  • Configure the Vite dev server to ignore the docs/ directory entirely
  • Ensure vite preview does not react to or serve files from docs/
  • Add docs/build to .gitignore to prevent accidental commits of generated documentation output
  • Preserve existing build, routing, and WASM workflows without modification

Fixes #125

✅ Type of Change

Place an "x" in the brackets below:

  • Bug fix 🐛
  • New feature ✨
  • Refactor 🔧
  • Documentation 📚
  • Build/dependency update 🧱
  • Other (describe):

🧪 How Has This Been Tested?

Please describe how you tested your changes (e.g., unit tests, manual testing, screenshots, etc.)

🧩 Checklist

Place an "x" in the brackets below:

  • I’ve followed the contribution guidelines.
  • My code follows the code style of this project.
  • I’ve added tests where necessary.
  • I’ve updated the documentation where applicable.
  • I’ve linked related issues or discussions (if any).
  • I’ve checked for breaking changes and backwards compatibility.

📸 Screenshots / Demo (if applicable)

Paste images, GIFs, or demo links here.

💬 Additional Context

Anything else relevant to the PR.

Summary by CodeRabbit

  • Chores
    • Exclude documentation build artifacts from version control to keep the repository cleaner.
    • Update development tooling to ignore documentation output during file-watching, reducing unnecessary rebuilds and improving developer workflow.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Jan 2, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Excludes the docs folder from Vite's watch processes for dev/preview by adding ignore patterns, and adds /docs/build to .gitignore to prevent documentation build artifacts from being tracked in Git.

Changes

Cohort / File(s) Summary
Gitignore configuration
\.gitignore
Added /docs/build to ignore documentation build artifacts.
Vite watch configuration
vite\.config\.js
Added **/docs/** to server.watch.ignored and preview.watch.ignored so changes in the docs folder do not trigger Vite reloads.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 I nibbled code and found a chore,

The docs now rest behind the door.
No noisy reloads, quiet and neat,
Build files hidden, peace complete.
Hop, devs, hop — a lighter beat!

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main change: configuring Vite to ignore docs in development and preview workflows, which directly matches the changeset modifications.
Linked Issues check ✅ Passed The PR successfully addresses all coding requirements from issue #125: updates vite.config.js to ignore docs in watch process, adds /docs/build to .gitignore, and maintains existing build and WASM workflows.
Out of Scope Changes check ✅ Passed All changes are directly scoped to the stated objectives: modifications are limited to vite.config.js and .gitignore to exclude docs folder from dev and preview processes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 52dd107 and 51f903f.

📒 Files selected for processing (1)
  • vite.config.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • vite.config.js

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
vite.config.js (1)

47-47: Consider using a more specific ignore pattern.

The pattern '**/docs/**' will ignore any docs folder at any depth in the project. Since the docs folder is at the repository root, the pattern 'docs/**' would be more specific and sufficient.

🔎 Proposed refinement
-      ignored: ['**/docs/**', 'src/wasm/**/*.js', 'src/wasm/**/*.wasm'],
+      ignored: ['docs/**', 'src/wasm/**/*.js', 'src/wasm/**/*.wasm'],
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8b7ea93 and 52dd107.

📒 Files selected for processing (2)
  • .gitignore
  • vite.config.js
🔇 Additional comments (1)
.gitignore (1)

15-16: LGTM!

The gitignore pattern correctly excludes the generated documentation build artifacts from version control.

Comment thread vite.config.js Outdated
@Ryan-Millard
Ryan-Millard merged commit f897186 into Ryan-Millard:main Jan 2, 2026
2 checks passed
laxitajain added a commit to laxitajain/Img2Num that referenced this pull request Jan 5, 2026
…d#186)

* refactor(vite): ignore docs in dev and preview folders

* refactor(vite): ignore docs in dev and preview folders

* fix(.gitignore): don't ignore docs/ files, docs/.gitignore does that

---------

Co-authored-by: Ryan-Millard <millardryandevon@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ignore docs folder in root app dev workflow

2 participants