'how does spfx get builded? how to build custom spfx generator
I am learning spfx webpart. I open the gulpfile.js file but it only has limited code lines. how can I know the procedure of building spfx webpart?
And I notice that there is a PNP spfx generator. is it possible to create my own custom spfx generator? or involve spfx into my node project?
thanks
Solution 1:[1]
SPFx projects are built using a complex Build System that is an npm package. You can find it under node_modules folder under the name - @microsoft/sp-build-web
This package makes use of more packages. You can go into the node_moduels folder and look for packages named @microsoft/gulp-core-build*
The entire build system is built in Object oriented code with lots of classes and interfaces using TypeScript.
If you want to just customize the Build process then you can build custom tasks which are coded in the gulpfile.js.
On good article to learn is at - https://rencore.com/blog/extending-sharepoint-framework-build-process-custom-tasks/
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | MindShare Learning |
