im问题修复
This commit is contained in:
@@ -29,7 +29,10 @@ class ImClient {
|
|||||||
if (typeof window !== 'undefined' && typeof window.commonEventFunc !== 'function') {
|
if (typeof window !== 'undefined' && typeof window.commonEventFunc !== 'function') {
|
||||||
window.commonEventFunc = function () {}
|
window.commonEventFunc = function () {}
|
||||||
}
|
}
|
||||||
this.sdk = getSDK({ coreWasmPath: '/openIM.wasm', debug: false })
|
// 用 BASE_URL 拼路径,部署到子目录时也能正确解析;线上 nginx 必须给 .wasm 配 application/wasm MIME
|
||||||
|
const base = (typeof process !== 'undefined' && process.env && process.env.BASE_URL) || '/'
|
||||||
|
const wasmUrl = base.replace(/\/?$/, '/') + 'openIM.wasm'
|
||||||
|
this.sdk = getSDK({ coreWasmPath: wasmUrl, debug: false })
|
||||||
this._wireEvents()
|
this._wireEvents()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user