https://github.com/pnp/sp-dev-fx-webparts
Big collection of web parts and tutorials for SharePoint Online.
Build with node.js v10 and npm v6.14.2, gulp, yeoman and SharePoint Framework Generator on Windows. Test with SharePoint Framework Workbench.
https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-script-editor
Built in React.
PS> npm install
Trust dev cert:
PS> gulp trust-dev-cert
Fire up the local web server:
PS> gulp serve --nobrowser
Check out in SPFx Workbench on tenant:
https://[tenantname].sharepoint.com/_layouts/workbench.aspx
Try and build solution:
PS> gulp bundle --ship
If you get a stdout error, check messages. In my case I had to update the browser db:
PS> npx browserslist@latest --update-db
Package the solution:
PS> gulp package-solution --ship
Look for sppkg under sharepoint/solution, pnp-script-editor.sppkg
.
Install in SharePoint app catalog and then to site.