Description
Which project does this relate to?
Create Tanstack App
Describe the bug
Some files in the applications that are generated are protected "high contention files". Meaning that multiple add-ons will want to alter them. An example of this is src/routes/__root.tsx
where providers are often placed. Instead of allowing add-ons to mutate these files directly we instead allow for framework specific integrations
. There is documentation about them with each framework.
Authoring an add-on should be as easy as possible, and for the most part it is. The integrations part are the most difficult part of creating an add-on. So we could be more proactive about telling folks to use these integrations when authoring an add-on.
- The framework should be able to expose a list of these protected "high contention" files
- The file list should have messages attached to each file indicating what integration type should be used to modify the file.
- Changes to one the protected files should be ignored and not included in the
.add-on/assets
directory.
An example message would be:
This add-on template includes modifications to ... These modifications are ignored. You should use the Providers integration instead to make changes to this file. Documentation for that is at (url).
Your Example Website or App
https://github.com/TanStack/create-tsrouter-app
Steps to Reproduce the Bug or Issue
- Attempt to do
pnpx create-tsrouter-app@latest add-on init
when a file like./src/routes/__root.tsx
has been altered.
Expected behavior
It should ignore the alteration and give you a message about how to properly modify that file.
Screenshots or Videos
No response
Platform
- OS: [e.g. macOS, Windows, Linux]
- Browser: [e.g. Chrome, Safari, Firefox]
- Version: [e.g. 91.1]
Additional context
No response