You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-sEXPORT_ES6 and multithreading too old browsers. (#25408)
~~Abort build if attempting to target -sEXPORT_ES6 and multithreading
with too old target browser versions.~~
Add ES6 Module Workers as feature in the feature matrix.
// See https://github.com/emscripten-core/emscripten/issues/22394
43
43
constpthreadWorkerOptions=`{
44
44
#if EXPORT_ES6
45
+
#if MIN_FIREFOX_VERSION < 114
46
+
#error new Worker() supports ECMAScript module only starting from Firefox 114. Pass -sMIN_FIREFOX_VERSION=114 to target -sEXPORT_ES6 with -pthread. See https://caniuse.com/mdn-api_worker_worker_ecmascript_modules
47
+
#endif
48
+
#if MIN_CHROME_VERSION < 80
49
+
#error new Worker() supports ECMAScript module only starting from Chrome 80. Pass -sMIN_CHROME_VERSION=80 to target -sEXPORT_ES6 with -pthread. See https://caniuse.com/mdn-api_worker_worker_ecmascript_modules
50
+
#endif
51
+
#if MIN_SAFARI_VERSION < 150000
52
+
#error new Worker() supports ECMAScript module only starting from Safari 15. Pass -sMIN_SAFARI_VERSION=150000 to target -sEXPORT_ES6 with -pthread. See https://caniuse.com/mdn-api_worker_worker_ecmascript_modules
Copy file name to clipboardExpand all lines: src/lib/libwasm_worker.js
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,15 @@
40
40
`;
41
41
constwasmWorkerOptions=`{
42
42
#if EXPORT_ES6
43
+
#if MIN_FIREFOX_VERSION < 114
44
+
#error new Worker() supports ECMAScript module only starting from Firefox 114. Pass -sMIN_FIREFOX_VERSION=114 to target -sEXPORT_ES6 with -sWASM_WORKERS. See https://caniuse.com/mdn-api_worker_worker_ecmascript_modules
45
+
#endif
46
+
#if MIN_CHROME_VERSION < 80
47
+
#error new Worker() supports ECMAScript module only starting from Chrome 80. Pass -sMIN_CHROME_VERSION=80 to target -sEXPORT_ES6 with -sWASM_WORKERS. See https://caniuse.com/mdn-api_worker_worker_ecmascript_modules
48
+
#endif
49
+
#if MIN_SAFARI_VERSION < 150000
50
+
#error new Worker() supports ECMAScript module only starting from Safari 15. Pass -sMIN_SAFARI_VERSION=150000 to target -sEXPORT_ES6 with -sWASM_WORKERS. See https://caniuse.com/mdn-api_worker_worker_ecmascript_modules
0 commit comments