Kibana not optimizing custom plugins

I'm trying to move our custom plugins from Kibana 8.6 to 8.12. On version 8.6, I can run
yarn knb bootstrap and then yarn start. This would run the optimizer on my custom plugins and then do a hot reload of Kibana when I made changes to any of the files. This does not happen on version 8.12.0. The only way I can get my custom plugins to optimize is by running the yarn run dev command from within the plugin folder. The plugin will then show up in Kibana. However, if I make a change to my plugin code, Kibana will not hot reload with that change. I have to stop Kibana and run the yarn run dev command again and then restart Kibana to see my changes. How do I setup the hot reload feature in Kibana 8.12 for custom plugins?

After a lot of Googling, I found this URL: Plugins do not compile , which addresses my issue. It seems you now have to run the yarn dev --watch command from within the custom plugin directory. Then start Kibana with the yarn start command. This will allow the plugin to hot reload when you save your changes.