0

I'm setting up to develop some SPFx webparts and extensions for use in our enterprise SharePoint online tenant. I've done the basic Hello World and am able to get it working. We have a small team and would like to also use our enterprise GitHub to work collaboratively on these projects -- as well as back them up.

But every project we start has something like 58,000+ files across 7,800+ folders, and is about 630MB in size. And as far as I can tell (for the simple stuff we're starting with) only about 3 or 4 of the files are anything that I'm modifying.

Is there some way to only get the files we need? I can't believe that all of that is necessary to compile an 11KB extension or 2MB webpart.

1 Answer 1

1

You should upload only the needed files to Github. Part of the default project should be the .gitignore file, which should exclude all the unimportant files like build files or node_modules folder when doing a commit via git. A default project is about 1mb in size and <30 files.

3
  • Thanks. I am wondering how then I retore or a colleague would collaborate. Is there something that helps reinstall it? Do I create a new project and then merge it somehow?
    – Rothrock
    Commented Aug 16 at 20:28
  • 1
    I am not sure what you are asking about but maybe you should check how git works and read something about npm (since SPFx is using npm for package management). In general the process would be you "upload" your changes to a git repository (or whatever version control you are using) and your colleagues download them. For the first time -your colleagues have to run "npm install" (they need the correct node.js/npm version) to install the packages the SPFx project is using. Maybe they also need to install gulp (npm install -g gulp) to build and run the project. Commented Aug 19 at 8:08
  • npm install was the thing we were looking for thank you.
    – Rothrock
    Commented Aug 20 at 17:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.