How can I watch other directories to trigger hot reload
I have another directory parallel to my main refine app which I include in package.json using the "file ../xxx" syntax. I would like the server to hot reload when I make a change to any file in that other directory. Is there a way to extend what directories are "watched"?
5 Replies
Hi @oshiri3676. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Hmm, I don't know enough to give you a confident answer yet. The knowledge sources provided do not contain specific information on how to extend the directories being watched for hot reloading in a Refine app.
However, in general, the
npm run dev
command is used to start the development server in watch mode. This command re-compiles the packages and examples when a change is made in any of them. The command used is npm run dev -- --scope @refinedev/antd --scope base-antd
as mentioned in the Refine documentation (https://refine.dev/docs/guides-concepts/contributing#starting-the-packages-and-examples-in-watch-mode).
For more specific information on how to extend the directories being watched, I would recommend checking the official Refine documentation or reaching out to the Refine community for support.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@783439443410813008> kapa.ai is still learning and improving, please let us know how it did by reacting below
vicious-gold•6mo ago
@kapa.ai What does the "--scope" mean on the "run dev" command?
Let me check the knowledge base for you. One moment! :books:
----------------------
The
--scope
flag is used with the npm run dev
command to specify which packages or examples you want to run in development mode.
For example, in the command npm run dev -- --scope @refinedev/antd --scope base-antd
, the --scope
flag is used to specify that you want to run the @refinedev/antd
package and the base-antd
example in development mode.
When you run this command, these specified packages and examples will start in watch mode, meaning they will re-compile when you make a change in any of them.
You can find more information about this in the Refine documentation (https://refine.dev/docs/guides-concepts/contributing#starting-the-packages-and-examples-in-watch-mode).
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@783439443410813008> kapa.ai is still learning and improving, please let us know how it did by reacting below