1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
| first require config
{ name: 'blackmatch', age: 18 }
require cache:
{ '/Users/blackmatch/Desktop/blackmatch/demos/require-cache-demo/test.js':
Module {
id: '.',
exports: {},
parent: null,
filename: '/Users/blackmatch/Desktop/blackmatch/demos/require-cache-demo/test.js',
loaded: false,
children: [ [Object] ],
paths:
[ '/Users/blackmatch/Desktop/blackmatch/demos/require-cache-demo/node_modules',
'/Users/blackmatch/Desktop/blackmatch/demos/node_modules',
'/Users/blackmatch/Desktop/blackmatch/node_modules',
'/Users/blackmatch/Desktop/node_modules',
'/Users/blackmatch/node_modules',
'/Users/node_modules',
'/node_modules' ] },
'/Users/blackmatch/Desktop/blackmatch/demos/require-cache-demo/config.json':
Module {
id: '/Users/blackmatch/Desktop/blackmatch/demos/require-cache-demo/config.json',
exports: { name: 'blackmatch', age: 18 },
parent:
Module {
id: '.',
exports: {},
parent: null,
filename: '/Users/blackmatch/Desktop/blackmatch/demos/require-cache-demo/test.js',
loaded: false,
children: [Object],
paths: [Object] },
filename: '/Users/blackmatch/Desktop/blackmatch/demos/require-cache-demo/config.json',
loaded: true,
children: [],
paths:
[ '/Users/blackmatch/Desktop/blackmatch/demos/require-cache-demo/node_modules',
'/Users/blackmatch/Desktop/blackmatch/demos/node_modules',
'/Users/blackmatch/Desktop/blackmatch/node_modules',
'/Users/blackmatch/Desktop/node_modules',
'/Users/blackmatch/node_modules',
'/Users/node_modules',
'/node_modules' ] } }
second require config
{ name: 'blackmatch', age: 18 }
|