I created an Excel Add-in project few months back using Visual Studio 2019. Now I am facing some issues and came to conclusion that Shared Runtime might not be configured correctly. So I followed this tutorial to update manifest of the project.
However after that It is mention to update webpack.config.js, but this file is not present in project. Even if I create a new project using VS2019, this file is not there. Can anyone guide me how to add this file like its location, contents etc so that I can add it and follow next steps to configure Shared Runtime correctly.
CodePudding user response:
You need to use the VSCode with yeoman generator to scaffold an add-in project which uses webpack for bundling. For example, the Build an Excel task pane add-in page contains guides for Visual Studio and Yeoman generator (as a rule VSCode or WebStorm developers).
CodePudding user response:
Reply from Rick Kirkham on Github page is below.
https://github.com/OfficeDev/office-js-docs-pr/issues/3568#issuecomment-1201573455
This tutorial creates an add-in project with Yo Office. That kind of project runs in Node.js. WebPack is a tool for bundling multiple JavaScript files into one. WebPack is only relevant to Node.js based projects. Since you created your project in VS 2019, your project uses C# or VB.NET on the server side and runs in an IIS server. WebPack is not used in that environment. That's why there is no webpack.config.js file. Whatever problems you are having with the shared runtime, you're not going to solve it with WebPack.
Consider raising your problem on Microsoft Q&A. Be sure to "office-addin-dev".
Alternatively, consider recreating your project as a Node.js project. You can use this tutorial as a good place to start.