Forge Tunnel keeps reloading when I import functions or classes from other files in the src/ directory

I am trying to break my project out into different files to make it more organized and readable, however whenever I import my functions, I run into an issue where forge tunnel continuously tries to hot reload.

for example I have an import statement in my index.js file like:
import { example } from './example';

At first when I run forge tunnel all is well and it deploys my latest changes and waits for requests. But then, after I make a change in the index.js file, the cli enters an infinite loop continuously reloading as if I had made changes, even though I haven’t.

Is there somewhere in the manifest file where I need to explicitly declare all files in the src directory? Has anyone else run into this?

  • To clarify, I am able to get this behavior to go away only by moving the functions defined in the other files into the index.js file. However this makes my project significantly less readable.

Hello Ethan!

Running forge tunnel with multiple files in your app is definitely supported and shouldn’t continuously reload.

Do you mind providing your files, stripped of any irrelevant logic, so we can take a look? I have just tried an app with multiple files and it worked correctly, reloading just once per change.