Original question was, whether is it possible to somehow extend the webpack/gulp inside of spfx solution to have an extra task to minify some js files supposed to move to Office365 CDN?

I would need to minify the sp-js library and its dependencies.

I am not so familiar with node.js / webpack/ gulp configurations.... , I just got an idea, it could be mminified not using the web-pack (it is used for dealing with the whole source files), but is it possible to install and configure e.g. uglify-js as a dev dependency and then write a separate task to do that minification?

  • 1
    spfx-js is minified by default. No need to hand-craft minification. – Nils Jun 3 '19 at 9:01
  • Yes, good to note. There was actually only the tslib.js for the minification. I used the uglify-js and uglify-save-license referenced in a small-one-file node app. Indeed, the other files did not need to be minified, just copied to a special folder before deploying to the CDN origin... – rychlmoj Jun 3 '19 at 12:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.