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"
}
});