File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -183,26 +183,28 @@ namespace AMDLoader {
183
183
this . _env = env ;
184
184
this . _didInitialize = false ;
185
185
this . _didPatchNodeRequire = false ;
186
-
187
- // js-flags have an impact on cached data
188
- this . _jsflags = '' ;
189
- for ( const arg of process . argv ) {
190
- if ( arg . indexOf ( '--js-flags=' ) === 0 ) {
191
- this . _jsflags = arg ;
192
- break ;
193
- }
194
- }
195
186
}
196
187
197
188
private _init ( nodeRequire : INodeRequire ) : void {
198
189
if ( this . _didInitialize ) {
199
190
return ;
200
191
}
201
192
this . _didInitialize = true ;
193
+
194
+ // capture node modules
202
195
this . _fs = nodeRequire ( 'fs' ) ;
203
196
this . _vm = nodeRequire ( 'vm' ) ;
204
197
this . _path = nodeRequire ( 'path' ) ;
205
198
this . _crypto = nodeRequire ( 'crypto' ) ;
199
+
200
+ // js-flags have an impact on cached data
201
+ this . _jsflags = '' ;
202
+ for ( const arg of process . argv ) {
203
+ if ( arg . indexOf ( '--js-flags=' ) === 0 ) {
204
+ this . _jsflags = arg ;
205
+ break ;
206
+ }
207
+ }
206
208
}
207
209
208
210
// patch require-function of nodejs such that we can manually create a script
You can’t perform that action at this time.
0 commit comments