File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ if (EXTERNAL_PATH) {
37
37
let lazy;
38
38
async function init () {
39
39
if (!lazy) {
40
- lazy = await import(require('node:url').pathToFileURL(require('node:module').createRequire('${ EXTERNAL_PATH } / dist/lexer.js').resolve('./lexer.mjs')));
40
+ lazy = await import(require('node:url').pathToFileURL(require('node:module').createRequire('${ path . join ( EXTERNAL_PATH , ' dist/lexer.js' ) } ').resolve('./lexer.mjs')));
41
41
}
42
42
module.exports = lazy;
43
43
return lazy.init();
Original file line number Diff line number Diff line change @@ -91,12 +91,7 @@ function copyLE (src, outBuf16) {
91
91
}
92
92
93
93
const loadWasm = ( typeof EXTERNAL_PATH === "string" && ( async ( ) => {
94
- return ( await import ( "node:fs/promises" ) )
95
- . readFile (
96
- ( await import ( "node:url" ) ) . fileURLToPath (
97
- import . meta. resolve ( "../lib/lexer.wasm" )
98
- )
99
- ) ;
94
+ return ( await import ( 'node:fs/promises' ) ) . readFile ( EXTERNAL_PATH ) ;
100
95
} ) ) || ( async ( ) => {
101
96
const binary = WASM_BINARY
102
97
if ( typeof window !== "undefined" && typeof atob === "function" ) {
You can’t perform that action at this time.
0 commit comments