Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

NodeTargetPlugin.js 508B

12345678910111213141516171819
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Tobias Koppers @sokra
  4. */
  5. "use strict";
  6. const ExternalsPlugin = require("../ExternalsPlugin");
  7. const builtins =
  8. // eslint-disable-next-line node/no-unsupported-features/node-builtins,node/no-deprecated-api
  9. require("module").builtinModules || Object.keys(process.binding("natives"));
  10. class NodeTargetPlugin {
  11. apply(compiler) {
  12. new ExternalsPlugin("commonjs", builtins).apply(compiler);
  13. }
  14. }
  15. module.exports = NodeTargetPlugin;