为了使 smartedit 工作,spartacus文档指出,有必要在 index.html 中提供 webApplicationInjector.js 脚本。
此外,需要使用 smartedit 实例列表设置值“data-smartedit-allow-origin”。
像这样:
<script id="smartedit-injector" src="webApplicationInjector.js" data-smartedit-allow-origin="localhost:9002"></script>
但是 Prod-Environments 的最佳实践是什么?是否有使用特定环境覆盖此值的构建过程?
因为我不想在 index.html 中列出所有可能的环境,包括 localhost。
任何帮助,将不胜感激。
非常感谢,朱利安