This repository was archived by the owner on Oct 18, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +1
-15
lines changed
Expand file tree Collapse file tree 2 files changed +1
-15
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ let mainThreadPort: MessagePort | undefined;
4242export const globalPreload : GlobalPreloadHook = ( { port } ) => {
4343 mainThreadPort = port ;
4444 return `
45- const require = getBuiltin('module').createRequire(getBuiltin('process').cwd() + '/<preload>' );
45+ const require = getBuiltin('module').createRequire(${ JSON . stringify ( import . meta . url ) } );
4646 require('@esbuild-kit/core-utils').installSourceMapSupport(port);
4747 port.unref(); // Allows process to exit without waiting for port to close
4848 ` ;
Original file line number Diff line number Diff line change 1- import path from 'path' ;
2- import fs from 'fs/promises' ;
31import { testSuite , expect } from 'manten' ;
42import { createFixture } from 'fs-fixture' ;
53import type { NodeApis } from '../../utils/node-with-loader.js' ;
@@ -39,12 +37,6 @@ export default testSuite(async ({ describe }, node: NodeApis) => {
3937 } ,
4038 } ) ;
4139
42- await fs . symlink (
43- path . resolve ( 'node_modules' ) ,
44- path . join ( fixture . path , 'node_modules' ) ,
45- 'dir' ,
46- ) ;
47-
4840 onTestFinish ( async ( ) => await fixture . rm ( ) ) ;
4941
5042 // Strict mode is not tested because ESM is strict by default
@@ -79,12 +71,6 @@ export default testSuite(async ({ describe }, node: NodeApis) => {
7971 'src/jsx.jsx' : checkJsx ,
8072 } ) ;
8173
82- await fs . symlink (
83- path . resolve ( 'node_modules' ) ,
84- path . join ( fixture . path , 'node_modules' ) ,
85- 'dir' ,
86- ) ;
87-
8874 onTestFinish ( async ( ) => await fixture . rm ( ) ) ;
8975
9076 const jsxJs = await node . load ( './src/jsx.jsx' , {
You can’t perform that action at this time.
0 commit comments