0

After going through the tutorials on SPFX, they show you how to use gulp to deploy your javascript/css to a Storage account and CDN.

However, when I'm creating solutions for clients, I'll store my code in /SiteAssets. Then, I'll a CEWP and link it to a txt file. This makes updating the code easy since all I have to do is add in a tag to pull in the JS/CSS from that folder in SiteAssets. This keeps the potential development barriers low since the rights needed are at a minimum and typically do things via JSOM. From a cost perspective, there's no CDN to worry about setting up/paying for since we're using an already existing folder to store/serve our content.

With SPFX, we require access to the App Catalog, and then deploy that app out. This means I'll need a lot higher access, which can cause a delay in some projects, not to mention if I have to update the app. My goal is to put together some decent proof-of-concepts for our company using the new experience.

Is there a way I can take the SPFX .webpart file (in /sharepoint/solution/debug) and upload it to the site using Import Webpart and have that link to my content in SiteAssets? I looked at Add HelloWorld web part to classic page but could not get it to work on a classic page.

1
  • HI Breant, I am new to spfx and want to generate an client side web part which will deploy master page and page layouts in sharepoint online. can you shed some light in this ?
    – Sigar Dave
    Jun 29, 2017 at 14:12

1 Answer 1

0

Are you trying to bypass needing to register your solution in the app catalog? If so - then no, there is no current way to do that. The .webpart file will have a reference to the component ID in the app catalog, and that is how the code is loaded.

3
  • Thanks, thats essentially what I was doing. So I could treat it like I would a content editor and load my code in SiteAssets and have the spapp refer to it in that location. I sorta realized this watching the tutorial of how the new webparts are loaded into the classic experience. (I was doing it wrong).
    – Brent
    Jan 6, 2017 at 22:22
  • Can you tell me if it's possible to have the spapp file still refer to js/css files at a site level? This way I can deploy the spapp to their App Catalog and still deliver a custom experience for them?
    – Brent
    Jan 6, 2017 at 22:26
  • So, kind of. You can certainly refer to js files living wherever, however it will be difficult to reference your files if your app gets loaded into a different site collection, subweb, etc. Jan 10, 2017 at 17:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.