Skip to content

Commit

Permalink
Try to make wasm support base path
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaitanLyss committed Aug 8, 2024
1 parent 01def1a commit 4873740
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@selenite/commons",
"version": "0.18.17",
"version": "0.18.18",
"repository": "github:ShaitanLyss/selenite-commons",
"license": "MIT",
"keywords": [
Expand Down
6 changes: 5 additions & 1 deletion src/lib/utils/xsd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,11 @@ export class XmlSchema {
*/
export async function parseXsd(xsd: string): Promise<XmlSchema | undefined> {
if (!isBrowser()) return;
await init();
await init(
import.meta.env.BASE_URL
? import.meta.env.BASE_URL + '/assets/commons_rs_bg.wasm'
: undefined
);
const schema = parse_xsd(xsd);

if (!schema) return;
Expand Down

0 comments on commit 4873740

Please sign in to comment.