source: imaps-frontend/node_modules/webpack/lib/node/NodeTargetPlugin.js

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 1.3 KB
Line 
1/*
2 MIT License http://www.opensource.org/licenses/mit-license.php
3 Author Tobias Koppers @sokra
4*/
5
6"use strict";
7
8const ExternalsPlugin = require("../ExternalsPlugin");
9
10/** @typedef {import("../Compiler")} Compiler */
11
12const builtins = [
13 "assert",
14 "assert/strict",
15 "async_hooks",
16 "buffer",
17 "child_process",
18 "cluster",
19 "console",
20 "constants",
21 "crypto",
22 "dgram",
23 "diagnostics_channel",
24 "dns",
25 "dns/promises",
26 "domain",
27 "events",
28 "fs",
29 "fs/promises",
30 "http",
31 "http2",
32 "https",
33 "inspector",
34 "inspector/promises",
35 "module",
36 "net",
37 "os",
38 "path",
39 "path/posix",
40 "path/win32",
41 "perf_hooks",
42 "process",
43 "punycode",
44 "querystring",
45 "readline",
46 "readline/promises",
47 "repl",
48 "stream",
49 "stream/consumers",
50 "stream/promises",
51 "stream/web",
52 "string_decoder",
53 "sys",
54 "timers",
55 "timers/promises",
56 "tls",
57 "trace_events",
58 "tty",
59 "url",
60 "util",
61 "util/types",
62 "v8",
63 "vm",
64 "wasi",
65 "worker_threads",
66 "zlib",
67 /^node:/,
68
69 // cspell:word pnpapi
70 // Yarn PnP adds pnpapi as "builtin"
71 "pnpapi"
72];
73
74class NodeTargetPlugin {
75 /**
76 * Apply the plugin
77 * @param {Compiler} compiler the compiler instance
78 * @returns {void}
79 */
80 apply(compiler) {
81 new ExternalsPlugin("node-commonjs", builtins).apply(compiler);
82 }
83}
84
85module.exports = NodeTargetPlugin;
Note: See TracBrowser for help on using the repository browser.