File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -10,10 +10,16 @@ let rrcErr;
10
10
let recorded = false ;
11
11
exports . start = ( ) => {
12
12
try {
13
- rrc = require ( 'strontium /relational_require_cache' ) ;
13
+ rrc = require ( 'alinode /relational_require_cache' ) ;
14
14
} catch ( err ) {
15
15
rrcErr = err . message ;
16
16
}
17
+ if ( ! rrc ) { // 兼容老版本
18
+ try {
19
+ rrc = require ( 'strontium/relational_require_cache' ) ;
20
+ rrcErr = null ;
21
+ } catch ( err ) { }
22
+ }
17
23
recordPgo = process . env . PGO_RECORD || process . argv . indexOf ( '--record-pgo' ) > - 1 ;
18
24
pgoEntries = [ process . cwd ( ) , path . join ( __dirname , 'node_modules' ) ] ;
19
25
loadedPgo = false ;
@@ -44,4 +50,4 @@ exports.info = (event) => {
44
50
return fs . statSync ( pgoFilePath ) . size ;
45
51
}
46
52
return fs . readFileSync ( pgoFilePath ) . slice ( start , start + size ) . toString ( 'base64' )
47
- }
53
+ }
You can’t perform that action at this time.
0 commit comments