1

I am trying to develop a traditional web part (SP2013, SP2010..) to host a modern SPFx client web part. I developed most of the plumbing and wrapping and I have some problems when actually render the client side web part on the screen.

First question: does anyone tried something like that before? Any help / hint could be given? (the reason to develop this is to make the on premise / old environments ready for migration to O365, so the solution could be develop in the latest and greatest)

Second question: Does anyone know the internals of the sp-client-base.js script? I am trying to load all necessary script for the client web part to load, but I have the following exception here:

Uncaught TypeError: Cannot read property 'SPFlight' of undefined

 var H = r(21);
 t.SPFlight = H.SPFlight,
 t.UrlQueryParameterCollection = H.UrlQueryParameterCollection,

I am trying to load the scripts required by the bundled version of the client side web part:

requirejs.config({
        baseUrl: '',
        paths: {
            'react': "https://cdnjs.cloudflare.com/ajax/libs/react/15.4.1/react.min",
            "react-dom": "https://cdnjs.cloudflare.com/ajax/libs/react/15.4.1/react-dom.min",
            "react-dom/server": "https://cdnjs.cloudflare.com/ajax/libs/react/15.4.1/react-dom-server.min",
            "office-ui-fabric-react": "https://spoprod-a.akamaihd.net/files/sp-client-prod_2016-11-21.008/office-ui-fabric-react.bundle_be96abb3871d2a34ee7217886924e19f",
            "@microsoft/sp-client-base": "https://spoprod-a.akamaihd.net/files/sp-client-prod_2016-11-21.008/sp-client-base_en-us_f35aa94ac66731c2577eee095f5caab4",
            "@microsoft/sp-client-preview": "https://spoprod-a.akamaihd.net/files/sp-client-prod_2016-11-21.008/sp-client-preview_en-us_361e44159463b3ee4ff7d3885e251a7c",
            "@microsoft/sp-lodash-subset": "https://spoprod-a.akamaihd.net/files/sp-client-prod_2016-11-21.008/sp-lodash-subset_b6842d77d21ead50d00dd0c4c07ec4cd",
            "@microsoft/sp-module-loader": "https://spoprod-a.akamaihd.net/files/sp-client-prod_2016-11-21.008/sp-module-loader_en-us_5a1887d81f61e6a8129e305758514174",
            "@ms/odsp-utilities-bundle": "https://spoprod-a.akamaihd.net/files/sp-client-prod_2016-11-21.008/odsp-utilities-bundle_ea5488cbbc2fb35df6547b3ed19bdcd6",
            "@microsoft/sp-webpart-base": "https://spoprod-a.akamaihd.net/files/sp-client-prod_2016-11-21.008/sp-webpart-base_en-us_7d0afa6ccf73b6579e56d7cc6f3990b8"
        }
    });

2 Answers 2

1

Consider following interesting webcast from PnP team:
Using modern web stack with SharePoint on-premises deployments

They are also created project on github demonstrating approach:
react-generic-app

With this approach you can later more smoothly move to SPFx.

2
  • Thanks for the info! I already used this to create full web stack solutions on premise (in react and angular), but I would like to integrate the SPFx ones. So, the same code base to work on both. Just to upload the spfx package file, copy the bundles somewhere and done. I am trying now to reverse engineer the workbench to try to implement it. Dec 29, 2016 at 12:31
  • Now I see... That's really interesting and cool. If you will be able to do this, please ping me :) Dec 29, 2016 at 12:35
0

At this point in time, SPFX is only available in O365. The plan is to port it to on-prem after it hits General Availability in the service and we have time to iron out any issues that crop up.

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.