當前位置:
首頁 >
前端技术
> javascript
>内容正文
javascript
如何让SAP Spartacus ng build生成的JavaScript资源附带上store ID
生活随笔
收集整理的這篇文章主要介紹了
如何让SAP Spartacus ng build生成的JavaScript资源附带上store ID
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
問題
As we are migrating our storefront to Spartacus, we can see the following JS resources generated do not contain the store id and this is causing issues with out cdn as we have multiple origin servers where to route the requests for this JS files.
- /runtime-es2015.js
- /polyfills-es2015.js
- /styles-es2015.js
- /vendor-es2015.js
- /main-es2015.js
期望的行為
- /uk/runtime-es2015.js
- /uk/polyfills-es2015.js
- /uk/styles-es2015.js
- /uk/vendor-es2015.js
- /uk/main-es2015.js
解決方案
參考這個StackOverflow帖子:What’s the difference between --base-href and --deploy-url parameters of angular-cli tool
使用如下命令行:
ng build --deploy-url /uk/
總結
以上是生活随笔為你收集整理的如何让SAP Spartacus ng build生成的JavaScript资源附带上store ID的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 曹操语录
- 下一篇: 如何解决使用JSON.stringify