Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/mjs/a11y/speech/speech.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if (MathJax.loader) {
} else {
const REQUIRE = typeof require !== 'undefined' ? require : MathJax.config.loader.require;
if (REQUIRE?.resolve) {
path = REQUIRE.resolve(`${path}/package.json`).replace(/\/[^\/]*$/, '');
path = REQUIRE.resolve(`${path}/require.mjs`).replace(/\/[^\/]*$/, '');
maps = REQUIRE.resolve(`${maps}/base.json`).replace(/\/[^\/]*$/, '');
} else {
path = maps = '';
Expand Down
1 change: 0 additions & 1 deletion components/mjs/a11y/sre/worker/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"to": "../../../../../bundle/sre",
"from": "../../../../../ts/a11y/sre",
"copy": [
"package.json",
"require.mjs",
"require.d.mts"
]
Expand Down
2 changes: 0 additions & 2 deletions components/mjs/a11y/sre/worker/webpack.cjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
const webpack = require('webpack');

module.exports = (pkg) => {
pkg.experiments = {outputModule: true};
pkg.output.library = {type: 'module'};
pkg.plugins.push(
new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 1,
Expand Down
3 changes: 0 additions & 3 deletions ts/a11y/sre/package.json

This file was deleted.

10 changes: 5 additions & 5 deletions ts/a11y/sre/speech-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ declare const SRE: any;
//
// Load SRE
//
await import('./sre.js')
.catch((_) => import(/* webpackIgnore: true */ './sre-lab.js')) // for use in the lab
.then((SRE) => {
global.SRE = SRE;
});
await (
global.isLab
? import(/* webpackIgnore: true */ './sre-lab.js') // for use in the lab
: import('./sre.js')
).then((SRE) => (global.SRE = SRE));

/*****************************************************************/

Expand Down
4 changes: 2 additions & 2 deletions ts/adaptors/HTMLAdaptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -627,12 +627,12 @@ export class HTMLAdaptor<
const file = `${path}/${worker}`;
const content = `
self.maps = '${quoted(maps)}';
import('${quoted(file)}');
importScripts('${quoted(file)}');
`;
const url = URL.createObjectURL(
new Blob([content], { type: 'text/javascript' })
);
const webworker = new Worker(url, { type: 'module' });
const webworker = new Worker(url);
webworker.onmessage = listener;
URL.revokeObjectURL(url);
return webworker;
Expand Down