Skip to content

Ignore Statamic storage changes in Vite - #152

Merged
duncanmcclean merged 1 commit into
6.xfrom
fix/ignore-statamic-storage-vite
Sep 8, 2026
Merged

duncanmcclean merged 1 commit into
6.xfrom
fix/ignore-statamic-storage-vite

Conversation

@jackmcdade

Copy link
Copy Markdown
Member

What this fixes

When running npm run dev, files generated by Statamic can sometimes be mistaken for source changes and cause Vite to refresh the browser. In some cases, that refresh generates another file and traps the Control Panel in a continuous reload loop.

The default Vite configuration now ignores files inside storage/statamic, while continuing to refresh normally when application templates and other source files change.

Existing projects experiencing this problem can add the same **/storage/statamic/** entry to the server.watch.ignored section of their vite.config.js file.

This works alongside statamic/cms#15363, which moves generated nocache views into the ignored storage directory. Related to statamic/cms#13158.

Testing

  • npm run build
  • Confirmed the resolved ignore pattern matches files inside storage/statamic/tmp/nocache.

@duncanmcclean duncanmcclean changed the title [6.x] Ignore Statamic storage changes in Vite Ignore Statamic storage changes in Vite Sep 8, 2026
@duncanmcclean
duncanmcclean merged commit 1131b60 into 6.x Sep 8, 2026
2 checks passed
@duncanmcclean
duncanmcclean deleted the fix/ignore-statamic-storage-vite branch September 8, 2026 07:24
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.

2 participants