This allows us to query the categories of modules in C++ so we can implement the code cache generator in C++ that does not depend on a Node.js binary. PR-URL: https://github.com/nodejs/node/pull/27046 Refs: https://github.com/nodejs/node/issues/21563 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
10 lines
215 B
JavaScript
10 lines
215 B
JavaScript
'use strict';
|
|
|
|
const { internalBinding } = require('internal/test/binding');
|
|
const {
|
|
moduleCategories: { canBeRequired }
|
|
} = internalBinding('native_module');
|
|
|
|
for (const key of canBeRequired) {
|
|
require(key);
|
|
}
|