This issue occurs when adding an application customizer using yo to an existing SPFx project that has a web part in it. When you add the application customizer, the Web Parts are no longer deployed.
After the application customizer is added to the project, the Web Part is no longer deployed (the application customizer is deployed).
My repo below shows the issue.
https://github.com/coreyroth/WebPartPlusAppCustomizer/blob/master/README.md
This is caused by the fact that web parts do not require a feature entry in package-solution.json. When you add an application customizer, it creates a feature entry and then the web parts are not deployed. In this case, when you run yo to add the application customizer, it should add the component ids of any existing web part to the feature.
Warnings should also be provided to users as to avoid having multiple features which causes issues with the wrong version of code being loaded as shown in issue #3199.
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
Here is a post detailing the work-around for when this occurs.
@coreyroth - were you using the 'skip feature activation' flag or not?
I'll answer on the question... the sample which @coreyroth provided is not using tenant scoped deployment (aka skip feature activation) and therefore requires a solution to be installed on a site. Basically, a developer is looking to deploy two web parts and one application extension to a single site. That should work and we'll absolutely need to have a look at this.
I just fell into this trap as well.
The link to the work-around that @coreyroth posted does not work.
Any suggestions for getting info on the work-around?
/Leif
Hi,
Any update on this issue ?
@coreyroth: Here is a post detailing the work-around for when this occurs.
Unfortunately, the link is broken now. Have you moved the blogpost to your new site? If so, could you please update the link?
WaybackMachine is your friend here:
https://web.archive.org/web/20191230100437/http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2019/01/08/how-to-properly-add-an-application-customizer-to-an-existing-spfx-web-part-project.aspx
presses CTRL+A, CTRL+C and CTRL+V
Most helpful comment
I'll answer on the question... the sample which @coreyroth provided is not using tenant scoped deployment (aka skip feature activation) and therefore requires a solution to be installed on a site. Basically, a developer is looking to deploy two web parts and one application extension to a single site. That should work and we'll absolutely need to have a look at this.