mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 18:23:43 +08:00
25 lines
1.0 KiB
Diff
25 lines
1.0 KiB
Diff
diff --git a/pkg/standalone/content_tag.js b/pkg/standalone/content_tag.js
|
|
index 0a676a08c4aa05d096d402da649bca24ad60cfc1..68cbe90df17b17eba9c232952b037df56df6648b 100644
|
|
--- a/pkg/standalone/content_tag.js
|
|
+++ b/pkg/standalone/content_tag.js
|
|
@@ -1,5 +1,6 @@
|
|
let wasm;
|
|
|
|
+const { TextDecoder, TextEncoder } = require('util');
|
|
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
|
|
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
diff --git a/pkg/standalone.js b/pkg/standalone.js
|
|
index cb50046539df05b41dcc842ffb98e354236f8d26..10eea2962ffd804905d85057bb25d5b30b4d2e11 100644
|
|
--- a/pkg/standalone.js
|
|
+++ b/pkg/standalone.js
|
|
@@ -1,5 +1,6 @@
|
|
-import init from "./standalone/content_tag.js";
|
|
+import { initSync } from "./standalone/content_tag.js";
|
|
+import module from "./standalone/content_tag_bg.wasm";
|
|
export { Preprocessor } from "./standalone/content_tag.js";
|
|
|
|
-await init();
|
|
+initSync(module);
|
|
|