如何将不同的清单文件用于开发和生产Excel JS React?
我正在尝试开发一个办公室加载项,并成功地将其部署到了Azure。但是,为了测试我的代码的小迭代,我想使用localhost。因此,我想拥有一个开发环境和生产环境。可悲的是,有关如何处理此操作的MS文档相当薄。如何设置项目进行部署和测试? MS文档仅指出,建议维护不同的清单文件: Microsoft清单文档
我已经创建了一个subtest.xml和一个subtest_prod.xml文件,但是我如何配置要采用哪个清单文件的项目?在WebPack.config.js文件中,我可以看到此信息:
const urlDev = "https://localhost:3000/";
const urlProd = "https://localhost:3000/"; // CHANGE THIS TO YOUR PRODUCTION DEPLOYMENT LOCATION
但是应该如何设置项目?因此,我可以选择运行开发(本地服务器)并准备好后,我可以将其部署到Azure?
非常感谢您对此事的建议。
I am trying to develop an office add-in and I succesfully deployed it to Azure. But for testing small iterations of my code I would like to use the localhost. So I would like to have a development environment and a production environment. Sadly the MS documentation on how to handle this is rather thin. How can I setup the project for deployment and testing? the MS documentation only states that it is recommended to maintain different manifest files:
microsoft manifest documentation
I have created a manifest.xml and an manifest_prod.xml file but how can I configure the project which manifest file to take? in the webpack.config.js file I can see this info:
const urlDev = "https://localhost:3000/";
const urlProd = "https://localhost:3000/"; // CHANGE THIS TO YOUR PRODUCTION DEPLOYMENT LOCATION
But how should the project be set up? so I can choose to run the development (local server) and once ready, I can deploy that to Azure?
many thanks for suggestions on the matter.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用Yeoman Generator来脚手架Web加载项项目,则使用WebPack来处理此类操作。打开
wepblpack.config.js
文件,然后在那里找到以下行:因此,您的清单将根据用于构建解决方案的配置进行更新。以下一部分可以解决问题:
因此,在发行配置中构建加载项,您将获得正确的清单文件,该文件已复制到生产URL。
尝试使用以下命令,然后查看结果清单文件:
In case if you've used the yeoman generator for scaffolding the web add-in project Webpack is used for handling such things. Open the
wepblpack.config.js
file and find the following lines there:So, your manifest will be updated according to the config used to build the solution. The following part does the trick:
So, building the add-in in the release configuration you will get a correct manifest file copied pointing to the production URL.
Try to use the following commands and then check out the result manifest file: