But it has a step to manually add SPFx app to a classic page and to get the XML. This is not possible in my case as I have to automate everything. Is there way to achieve my need or to tweak the method provided in the post.
As far my code is -
Add-PnPSiteCollectionAppCatalog -Site $url Add-PnPApp -Path D:/custom.sppkg -Scope Site -Publish Install-PnPApp -Identity "custom-webpart" -Scope Site