pnp / sp-starter-kit

Modern SharePoint Starter Kit - End-to-end showcase solution to get started with modern experiences.
MIT License
765 stars 536 forks source link

Unhide Banner when using sppkg #686

Open sstark1123 opened 8 months ago

sstark1123 commented 8 months ago

How do you update the sppkg to make it so the banner webpart is visible when using instead of hidden by default?

eoverfield commented 8 months ago

Check out the following file: https://github.com/pnp/sp-starter-kit/blob/master/source/react-banner/src/webparts/banner/BannerWebPart.manifest.json

line 18, "hiddenFromToolbox": true,

Set this to false, this will allow the banner to be visible within the toolbox so it may be added to webpages.

Once you set to false, from the react-banner folder, you will need to then run:

gulp bundle --ship gulp package-solution --ship

And finally upload the generated sppkg to your app catalog

sstark1123 commented 8 months ago

Thank you.

sstark1123 commented 8 months ago

When I run gulp bundle --ship I get

Error - sass - src\webparts\banner\components\Banner.module.scss(1,9): error Error: Can't find stylesheet to import. ╷ 1 │ @import '~@fluentui/react/dist/sass/References.scss'; │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ╵ src\webparts\banner\components\Banner.module.scss 1:9 root stylesheet