我创建了一个无主机的渐进式blazor WebAssembly应用程序。
已遵循URL重写模块,发布后上报错误:
Error parsing 'integrity' attribute ('undefined'). The hash algorithm must be one of 'sha256', 'sha384', or 'sha512', followed by a '-' character.
(anonymous) @ blazor.webassembly.js:1
blazor.webassembly.js:1 Uncaught (in promise) Error: Content hash is required
at e.<anonymous> (blazor.webassembly.js:1)
at blazor.webassembly.js:1
at Object.next (blazor.webassembly.js:1)
at blazor.webassembly.js:1
at new Promise (<anonymous>)
at blazor.webassembly.js:1
at e.loadResourceWithCaching (blazor.webassembly.js:1)
at e.loadResource (blazor.webassembly.js:1)
at blazor.webassembly.js:1
at l (blazor.webassembly.js:1)
blazor.webassembly.js:1 Uncaught (in promise) Error: Content hash is required
at e.<anonymous> (blazor.webassembly.js:1)
at blazor.webassembly.js:1
at Object.next (blazor.webassembly.js:1)
at blazor.webassembly.js:1
at new Promise (<anonymous>)
at blazor.webassembly.js:1
at e.loadResourceWithCaching (blazor.webassembly.js:1)
at e.loadResource (blazor.webassembly.js:1)
at blazor.webassembly.js:1
at l (blazor.webassembly.js:1)
Error parsing 'integrity' attribute ('undefined'). The hash algorithm must be one of 'sha256', 'sha384', or 'sha512', followed by a '-' character.
:52335/_framework/undefined:1 Uncaught SyntaxError: Unexpected token '<'
service-worker.js:15 Service worker: Install发布于 2021-09-25 09:50:18
我遇到了同样的错误,这条评论对我很有帮助:https://stackoverflow.com/a/65470781/2358515
在发布选项中检查target framework -对于客户端应用程序,应为browser-wasm
https://stackoverflow.com/questions/68167094
复制相似问题