forked from open-telemetry/opentelemetry-js-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.node-polyfills.js
52 lines (51 loc) · 1.32 KB
/
webpack.node-polyfills.js
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
46
47
48
49
50
51
52
module.exports = {
// Enable the assert library polyfill because that is used in tests
assert: true,
// The assert polyfill from github.com/browserify/commonjs-assert
// also requires the `global` polyfill.
global: true,
// Turn off all other Node.js API polyfills for the browser tests to
// make sure that we are not attempting to use Node-specific APIs in
// the browser code. Instead, we will write browser specific
// implementations of platform functionality we need under the
// `./src/platform/browser` folder. This allows for writing browser
// optimized implementations of the specific needed functionality
// rather than bringing in (sometimes large) polyfills for the
// corresponding Node APIs.
Buffer: false,
__dirname: false,
__filename: false,
buffer: false,
child_process: false,
cluster: false,
console: false,
constants: false,
crypto: false,
dgram: false,
dns: false,
domain: false,
events: false,
fs: false,
http: false,
https: false,
module: false,
net: false,
os: false,
path: false,
process: false,
punycode: false,
querystring: false,
readline: false,
repl: false,
setImmediate: false,
stream: false,
string_decoder: false,
sys: false,
timers: false,
tls: false,
tty: false,
url: false,
util: false,
vm: false,
zlib: false
};