File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,12 @@ function serialize<T extends ProfileNode>(
108
108
while ( entries . length > 0 ) {
109
109
const entry = entries . pop ( ) ! ;
110
110
const node = entry . node ;
111
+
112
+ // mjs files have a `file://` prefix in the scriptName -> remove it
113
+ if ( node . scriptName . startsWith ( 'file://' ) ) {
114
+ node . scriptName = node . scriptName . slice ( 7 ) ;
115
+ }
116
+
111
117
if ( ignoreSamplesPath && node . scriptName . indexOf ( ignoreSamplesPath ) > - 1 ) {
112
118
continue ;
113
119
}
Original file line number Diff line number Diff line change @@ -359,7 +359,7 @@ async function getMapFiles(baseDir: string): Promise<string[]> {
359
359
const mapFiles : string [ ] = [ ] ;
360
360
for await ( const entry of walk (
361
361
baseDir ,
362
- filename => filename . endsWith ( '.js .map' ) ,
362
+ filename => / \. [ c m ] ? j s \ .m a p $ / . test ( filename ) ,
363
363
( root , dirname ) =>
364
364
root !== '/proc' && dirname !== '.git' && dirname !== 'node_modules'
365
365
) ) {
You can’t perform that action at this time.
0 commit comments