How do I use AddPnPJavascriptLink and Block to add the CSS to the third party js

%3CLINGO-SUB%20id%3D%22lingo-sub-31150%22%20slang%3D%22en-US%22%3EHow%20do%20I%20use%20AddPnPJavascriptLink%20and%20Block%20to%20add%20the%20CSS%20to%20the%20third%20party%20js%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-31150%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20adding%20references%20to%20my%20external%20library%20and%20it%20loads%20fine%20in%20the%20page%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EConnect-PNPOnline%20-Url%20%3CA%20href%3D%22https%3A%2F%2Fmyteams.qqq.com%2Fsites%2Ftmnaisa%2FIS%2FPlayArea%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmyteams.qqq.com%2Fsites%2Ftmnaisa%2FIS%2FPlayArea%3C%2FA%3E-Credential%20sp%3CBR%20%2F%3EAdd-PnPJavaScriptLink%20-Name%20JQuery%20-Url%20%3CA%20href%3D%22https%3A%2F%2Fmyteams.qqq.com%2Fsites%2Ftmnaisa%2FIS%2FSiteAssets%2FThirdPartyTools%2Fjquery-3.1.1.min.js%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmyteams.qqq.com%2Fsites%2Ftmnaisa%2FIS%2FSiteAssets%2FThirdPartyTools%2Fjquery-3.1.1.min.js%3C%2FA%3E-Sequence%20100%3CBR%20%2F%3EAdd-PnPJavaScriptLink%20-Name%20Angular%20-Url%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EProblem%20I%20have%20is%20I%20have%20all%20these%20library%20but%20they%20have%20css%26nbsp%3Bfiles%20associated%20to%20them.%20%26nbsp%3BHow%20do%20I%20register%20the%20CSS%20so%20they%20are%20also%20available%20on%20all%20my%20pages%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-31273%22%20slang%3D%22en-US%22%3ERe%3A%20How%20do%20I%20use%20AddPnPJavascriptLink%20and%20Block%20to%20add%20the%20CSS%20to%20the%20third%20party%20js%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-31273%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20also%20use%20this%20pattern%20to%20inject%20CSS%20using%20custom%20actions%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FOfficeDev%2FPnP%2Ftree%2Fmaster%2FSamples%2FBranding.CustomCSS%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2FOfficeDev%2FPnP%2Ftree%2Fmaster%2FSamples%2FBranding.CustomCSS%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBr%2C%20Ivan%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-31229%22%20slang%3D%22en-US%22%3ERE%3A%20How%20do%20I%20use%20AddPnPJavascriptLink%20and%20Block%20to%20add%20the%20CSS%20to%20the%20third%20party%20js%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-31229%22%20slang%3D%22en-US%22%3EHow%20about%20import%20CSS%20in%20alternative%20CSS%20file%3F%3C%2FLINGO-BODY%3E
Occasional Contributor

I am adding references to my external library and it loads fine in the page

 

Connect-PNPOnline -Url https://myteams.qqq.com/sites/tmnaisa/IS/PlayArea -Credential sp
Add-PnPJavaScriptLink -Name JQuery -Url https://myteams.qqq.com/sites/tmnaisa/IS/SiteAssets/ThirdPartyTools/jquery-3.1.1.min.js -Sequence 100
Add-PnPJavaScriptLink -Name Angular -Url 

 

Problem I have is I have all these library but they have css files associated to them.  How do I register the CSS so they are also available on all my pages?

2 Replies
How about import CSS in alternative CSS file?

Hi,

 

You can also use this pattern to inject CSS using custom actions: https://github.com/OfficeDev/PnP/tree/master/Samples/Branding.CustomCSS

 

Br, Ivan