cli
cli copied to clipboard
Code injection during dev mode
Which problem is this feature request solving?
During the build process, I can inject code into the built functions files without any problem.
However during dev when the files are continuously being rebuilt, this is much harder. While we do have hooks for onPreDev
and onDev
, there are no other hooks related to actually building/bundling the files. I tried adding a file watcher so I could watch and update the files when they change, but it seems the plugin execution ends immediately and I can't start any long-running background process. (something that could be documented more clearly!)
Describe the solution you'd like
Some possible solutions
- add hooks that fire as files are emitted by the netlify dev process
- allow long-running processes from the build plugin (file watcher)
Pull request (optional)
- [ ] I can submit a pull request.