Share via

How can I deploy a react-based outlook addin

Isora Dolage 26 Reputation points
2022-06-08T05:35:50.52+00:00

Hi

I have created an outlook office add-in using the yeoman generator react-taskpane option. The add-in is sideloaded in outlook.com/ outlook desktop application and mobile.

I tried the following production deployment steps as I would do for a normal react app:

  1. Created the dist folder using npm run build
  2. Ran the command npm install -g serve in VS code terminal
  3. Ran the command serve -s dist in VS code terminal but got the following error:
    "serve.ps1 cannot be loaded because running scripts is disabled on this system"
    But when I ran the same command in cmd prompt it worked and started serving.

But all the corresponding .js files to the .tsx files are not inside the dist folder. What could be the reason for this?

Link to Stack Overflow: https://stackoverflow.com/questions/72540522/how-can-i-deploy-a-react-based-outlook-add-in

Microsoft 365 and Office | Development | Office JavaScript API
Microsoft 365 and Office | Development | Other
Outlook | Windows | Classic Outlook for Windows | For business
Microsoft 365 and Office | Install, redeem, activate | For business | Windows
Microsoft 365 and Office | Development | Microsoft 365 Publishing
0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.