1

I would like to create a Vue3 app which should run on SharePoint Online (Classic mode). If here is someone who already did such a solution, please, could you describe me what everything I have to do to run Vue3 app on SharePoint?

Thank you!

1 Answer 1

1

I am currently attempting this myself.

Have had some initial success using this approach https://github.com/BenRunInBay/vue3-spfx

Although, I have run into a bit of trouble with how to use vue-router :)

Basically, you create a Vue3 application however you want... I like this template: https://github.com/Sensanaty/vue3-vite-template

Within that project, you create a "webpart" directory... then you create your webpart in that newly-created directory.

It's a bit hacky, but it works to some degree.

You end up with a .sppkg file for the Sharepoint App Catalog

There's also been some recent updates in the 2 vue samples here: https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples

But both of these examples use vue 2 and node 8.

My approach allows at least Vue3 + Vite + Pinia + Axios + Node 14 with SPFX 1.13.1

7
  • I got lost in your sentence: "Within that project, you create a "webpart" directory... then you create your webpart in that newly-created directory." Could you describe it more deeply? I don't know how you can copy your project files and folders to SharePoint subsite and how to create a start page for the Vue app in there. Also don't know what .sppkg file means. Please, could you help me here? :) If there is no way how to use Vue-router, then shouldn't be better to use React for SharePoint development?
    – Milan
    Commented Feb 23, 2022 at 15:24
  • I advise you to start with the github.com/BenRunInBay/vue3-spfx template ... closely read his instructions and read the comments throughout the project. Commented Feb 24, 2022 at 16:15
  • Thank you for your advise! This will take me some time, so will let you know the result later :)
    – Milan
    Commented Feb 25, 2022 at 10:38
  • The vue3-spfx project was recently updated and has changed quite a bit. You should give it a go now :) Commented Apr 6, 2022 at 7:23
  • Hi, thank you so much for your help! Unfortunately, I have not been able to create Vue3 app for Sharepoint until now :( I don't understand the steps on the page github.com/BenRunInBay/vue3-spfx. Step 2. Delete the .git folder and re-initialize this as your own git repo. -> I copied the repo, have it opened in Visual Code but I don't know how should I "re-initialize" it and also don't know how to proceed with the further steps. I created a few simple apps using javascript but I don't understand these "buzz" words... Could you go through the setup with me, please?
    – Milan
    Commented Apr 7, 2022 at 8:19

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.