File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ if (MathJax.loader) {
1414 } else {
1515 const REQUIRE = typeof require !== 'undefined' ? require : MathJax . config . loader . require ;
1616 if ( REQUIRE ?. resolve ) {
17- path = REQUIRE . resolve ( `${ path } /package.json ` ) . replace ( / \/ [ ^ \/ ] * $ / , '' ) ;
17+ path = REQUIRE . resolve ( `${ path } /require.mjs ` ) . replace ( / \/ [ ^ \/ ] * $ / , '' ) ;
1818 maps = REQUIRE . resolve ( `${ maps } /base.json` ) . replace ( / \/ [ ^ \/ ] * $ / , '' ) ;
1919 } else {
2020 path = maps = '' ;
Original file line number Diff line number Diff line change 66 "to" : " ../../../../../bundle/sre" ,
77 "from" : " ../../../../../ts/a11y/sre" ,
88 "copy" : [
9- " package.json" ,
109 " require.mjs" ,
1110 " require.d.mts"
1211 ]
Original file line number Diff line number Diff line change 11const webpack = require ( 'webpack' ) ;
22
33module . exports = ( pkg ) => {
4- pkg . experiments = { outputModule : true } ;
5- pkg . output . library = { type : 'module' } ;
64 pkg . plugins . push (
75 new webpack . optimize . LimitChunkCountPlugin ( {
86 maxChunks : 1 ,
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -110,11 +110,11 @@ declare const SRE: any;
110110 //
111111 // Load SRE
112112 //
113- await import ( './sre.js' )
114- . catch ( ( _ ) => import ( /* webpackIgnore: true */ './sre-lab.js' ) ) // for use in the lab
115- . then ( ( SRE ) => {
116- global . SRE = SRE ;
117- } ) ;
113+ await (
114+ global . isLab
115+ ? import ( /* webpackIgnore: true */ './sre-lab.js' ) // for use in the lab
116+ : import ( './sre.js' )
117+ ) . then ( ( SRE ) => ( global . SRE = SRE ) ) ;
118118
119119 /*****************************************************************/
120120
Original file line number Diff line number Diff line change @@ -627,12 +627,12 @@ export class HTMLAdaptor<
627627 const file = `${ path } /${ worker } ` ;
628628 const content = `
629629 self.maps = '${ quoted ( maps ) } ';
630- import ('${ quoted ( file ) } ');
630+ importScripts ('${ quoted ( file ) } ');
631631 ` ;
632632 const url = URL . createObjectURL (
633633 new Blob ( [ content ] , { type : 'text/javascript' } )
634634 ) ;
635- const webworker = new Worker ( url , { type : 'module' } ) ;
635+ const webworker = new Worker ( url ) ;
636636 webworker . onmessage = listener ;
637637 URL . revokeObjectURL ( url ) ;
638638 return webworker ;
You can’t perform that action at this time.
0 commit comments