2017-08-22 146 views

回答

2

node.gyp中删除您不想要的模块,从lib文件夹中删除.js文件,将其从阵列中删除,然后构建它。

{ 
    'variables': { 
    'v8_use_snapshot%': 'false', 
    'v8_trace_maps%': 0, 
    'node_use_dtrace%': 'false', 
    'node_use_lttng%': 'false', 
    'node_use_etw%': 'false', 
    'node_use_perfctr%': 'false', 
    'node_no_browser_globals%': 'false', 
    'node_use_v8_platform%': 'true', 
    'node_use_bundled_v8%': 'true', 
    'node_shared%': 'false', 
    'force_dynamic_crt%': 0, 
    'node_module_version%': '', 
    'node_shared_zlib%': 'false', 
    'node_shared_http_parser%': 'false', 
    'node_shared_cares%': 'false', 
    'node_shared_libuv%': 'false', 
    'node_use_openssl%': 'true', 
    'node_shared_openssl%': 'false', 
    'node_v8_options%': '', 
    'node_enable_v8_vtunejit%': 'false', 
    'node_core_target_name%': 'node', 
    'library_files': [ 
     'lib/internal/bootstrap_node.js', 
     'lib/async_hooks.js', 
     'lib/assert.js', 
     'lib/buffer.js', 
     'lib/child_process.js', //Remove this line 
     'lib/console.js', 
     'lib/constants.js', 
     'lib/crypto.js', 
     'lib/cluster.js', 
     'lib/dgram.js', 
     'lib/dns.js', //Remove this line too 
[...] 

要知道,这些模块的测试和基准测试使用,并与child_proccess例如,在lib/internal/v8_prof_polyfill.jslib/internal/cluster/master.js

相关问题