Generate only certain files

Hello,
I am wondering if there is a way to generate only certain files with the build command.

For context, I am using a helper function to fetch data from an api and would like to reload only files that have to be reloaded when data are changed.