Article
7 comments

Optimize your SPFx projects with React.lazy

SharePoint Framework offers you a pretty solid project setup, but on the other hand, it doesn’t give you options to optimise the gulp, build or the webpack configuration.
The more web parts exist in a single project, the slower the build task become and all the code in the project will be compiled at once, instead of smaller incremental builds. Technical possible but not yet supported.

Optimise your SPFx project with React.lazy

The good thing is that there are some options you can directly trigger from your web part code. Some of these options affect webpack others can be applied in ReactJS. Not only in case of build times but also case of user experience and web part performance.

[Read more]

Article
0 comment

SPFx-uifabric-themes v0.7.0 released aka SPFx-uifabric-themes AliceBlue

Its been a while since the last release for my toolset for Theming in SharePoint development. I work on a product, and I have to make sure that the web part design is flexible enough to work great with any SharePoint applied theme. I discovered many changes in the currently available theme slots.

v0.7.0-release-AliceBlue

The support in case of SASS variables in your standard SharePoint project is limited. It was time to update my tool, but it comes with more great features that only SASS variables.

[Read more]

Article
0 comment

this.domElement is your new document object in SPFx web parts development

You are familiar with the JavaScript method like ‘document.getElementByID’. Since HTML5 the Document Object Model has more to offer than return an element by its ID on a document.

Use this.document instead of document

Use this.document instead of document

I case of web part development you should forget that the document object inside and HTML exists instead you should request HTML elements differently.

[Read more]

Article
1 comment

PnP SPFx generator 1.6 released – A release to make your developer and team leads life easier

Without a doubt, the SharePoint Framework is one of the most successful adoptions and customisation models that has ever found its way into SharePoint, and there are reasons for this.

Over the past years, I talked and worked together with many developers that haven’t ever touched SharePoint before or found its way into this Application.

Many of those had a background in C# while, especially for a branding project, was more living in the web world. The overall feedback was that it is this kind of development unique in many ways.

[Read more]

Article
0 comment

How to create an SPFx project using a specific version

Have you ever wanted to run an older version of the SPFx generator? Maybe on an existing project to add some new assets? It is possible without any installation of the generator at all. Recently a tool was released inside your NPM installation that is named ‘NPX‘.

In short, NPX is a tool that allows you to run npm binaries and packages without having them installed locally. This tool got first released in NPM 5.2.0.

[Read more]

Article
0 comment

How to copy files from src to lib folder in SPFx?

Sometimes there is the requirement to move files from your source code directory to the lib folder. These files can be images, JSON files or any imaginable asset that is not recognised by the build chain of SPFx.

There are two ways to achieve this one. One used gulp the other gets accomplished through the configuration of a copy-static-assets.json. Let me explain these to methods what scenarios suites best in which case.

[Read more]