Skip to content

Commit

Permalink
Merge pull request #5294 from Tanddant/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
hugoabernier authored Oct 13, 2024
2 parents 0f1a17d + 794d387 commit bb84e82
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 460 deletions.
1 change: 1 addition & 0 deletions samples/react-add-js-css-ref/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.20.2
16 changes: 1 addition & 15 deletions samples/react-add-js-css-ref/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
---
page_type: sample
products:
- office-sp
languages:
- javascript
- typescript
extensions:
contentType: samples
technologies:
- SharePoint Framework
platforms:
- react
createdDate: 04/24/2020 12:00:00 AM
---
# Add JS and CSS reference on Modern Pages via SPFx application customizer extension

This repo is a react based SPFx web part and extension that allows users to add/modify/delete custom js and css file references using SPFx application customizer extension all modern pages within SP online site. This web part provides an interface to JS and CSS file references so that we don't have to modify code when we need to change references or add new references in the future. As part of security measures, this actions on web part can be only accessed by users who have Manage web permission on site.
Expand All @@ -22,6 +7,7 @@ Web Part in Action
![Web part in action](assets/webpartinaction.gif?raw=true "web part in action")

Challenges/Drawback with ONLY using SPFx extension for adding js and css file references.

* JS and CSS file references links needs to be hardcoded in solution
* Changes to code required if we need to change add new reference or remove existing reference.
* Redeployment of package and installation
Expand Down
2 changes: 1 addition & 1 deletion samples/react-add-js-css-ref/assets/sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"React-based SPFx web part and extension that allows users to add/modify/delete custom js and css file references using SPFx application customizer extension all modern pages within SP online site."
],
"creationDateTime": "2020-06-11",
"updateDateTime": "2022-10-24",
"updateDateTime": "2024-10-09",
"products": [
"SharePoint"
],
Expand Down
2 changes: 1 addition & 1 deletion samples/react-add-js-css-ref/config/package-solution.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"solution": {
"name": "react-add-js-css-ref-client-side-solution",
"id": "d9c30e1a-bf06-46fa-807d-ce5182d9c91c",
"version": "2.1.0",
"version": "2.1.0.0",
"includeClientSideAssets": true,
"isDomainIsolated": false,
"developer": {
Expand Down
Loading

0 comments on commit bb84e82

Please sign in to comment.