Monday, October 16, 2017

Removing the hash from the SPFx bundle file name

Just a quick follow up on this topic Controlling SPFx bundle file name in production builds

It seems the latest drop of SPFx added a new setting that allows you to bypass the hash mechanism and prevent it from being added to your bundle file names.

I have yet to confirm this, but it seems you can add this code to you gulpfile.js:
build.copyAssets.taskConfig = { excludeHashFromFileNames: true, }

And this will stop adding the hash to the file names.

By: Franck Cornu

I will give it a try and update here if it works. See my other blog post on how to edit the file name and add the version number automatically as well.

Edit: I just verified this is working as of 1.4.0

No comments: