File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
packages/rspack/src/trace Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -30,21 +30,22 @@ export class JavaScriptTracer {
30
30
// plugin counter for different channel in trace viewer, choose 100 to avoid conflict with known tracks
31
31
// biome-ignore lint/correctness/noUnusedPrivateClassMembers: this is a bug of biome which can't analyze cross module usage
32
32
private static counter = 10000 ;
33
+
33
34
/**
34
35
* only first call take effects, subsequent calls will be ignored
35
36
* @param layer tracing layer
36
37
* @param output tracing output file path
37
38
*/
38
39
static async initJavaScriptTrace ( layer : string , output : string ) {
39
- //FIXME: workaround for Node.js 16 crash bug, remove it when drop support for Node.js 16
40
- const { Session } = require ( "node:inspector" ) ;
40
+ const { Session } = await import ( "node:inspector" ) ;
41
41
this . session = new Session ( ) ;
42
42
this . layer = layer ;
43
43
this . output = output ;
44
44
this . events = [ ] ;
45
45
this . state = "on" ;
46
46
this . startTime = process . hrtime . bigint ( ) ; // use microseconds
47
47
}
48
+
48
49
static uuid ( ) {
49
50
return this . counter ++ ;
50
51
}
You can’t perform that action at this time.
0 commit comments