I want to include the ngsw in my build so that create offline verion of the application. In the build script in the package.json
I have next: "build": "ng build --prod --base-href /test/"
The generated ngsw.json have the files that are "/test/index.html"
. As I can judge it assumes that I am on the localhost:3000
, but i use localhost:3000/test
, so that I got lots of errors. How to fix this issue?
您需要用ng build --prod --base-href=/test/
代替"build"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.