Forum Discussion
Mike Jansen
Jun 12, 2017Iron Contributor
Sharepoint framework > reference to custom javascript
I try to convert an "old" content editor webpart to a SharePoint Modern webpart. My original script contains a few references to custom .js files. In my new solution I added this to my "webpart.ts" f...
Mike Jansen
Jun 13, 2017Iron Contributor
After a day of searching and testing, i found this:
https://blog.mastykarz.nl/bundling-external-frameworks-sharepoint-framework-client-side-web-parts-bad-idea/
Looks like my idea of bundling my javascripts file in the webpart is not the best approach. I know put them on my Sharepoint site (site assets) and referenced them in the "config.json" file. No more build errors so we are getting somewhere.
However, suppose I want to distribute my webpart to different tenants, what might be the best place to put my .js files? Azure somewhere? Or is there a better solution?
Jun 13, 2017
Hi Mike Jansen,
You could put those scripts anywhere ( as long as they are accesible).
Have you looked at the Azure CDN?