I am working in a SharePoint Framework (SPFx) project in Online version. We have created two separate projects, one is main project and another one is common project. The common project will contain the custom components which will be reusable across the projects.

But i got stuck in including the common component in the Main project. Any one please suggest the solution to include the component under the common project into the main project component.

Thanks in advance...

  • is your common project a yeoman generated SPFx project or a simple javascript/typescript, gulp,webpack project ? – Vipul Kelkar Jul 19 '18 at 5:04
  • It is a yeoman generated SPFx Project – Prakash Jul 19 '18 at 5:12
  • By component do you mean React component ? An option is to create the common project as a simple JS project, bundle it up and refer in your main SPFx project. This way you can have react components and common in a separate JS bundle. – Vipul Kelkar Jul 19 '18 at 5:25
  • Actually it is a React component – Prakash Jul 19 '18 at 5:35

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.