diff options
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/polyfills.ts | 6 | ||||
-rw-r--r-- | client/src/shims/http.ts | 1 | ||||
-rw-r--r-- | client/src/shims/https.ts | 1 | ||||
-rw-r--r-- | client/src/shims/noop.ts | 3 | ||||
-rw-r--r-- | client/src/shims/path.ts | 1 |
5 files changed, 12 insertions, 0 deletions
diff --git a/client/src/polyfills.ts b/client/src/polyfills.ts index 423a7b915..eec30760d 100644 --- a/client/src/polyfills.ts +++ b/client/src/polyfills.ts | |||
@@ -80,3 +80,9 @@ import 'zone.js/dist/zone' // Included with Angular CLI. | |||
80 | /*************************************************************************************************** | 80 | /*************************************************************************************************** |
81 | * APPLICATION IMPORTS | 81 | * APPLICATION IMPORTS |
82 | */ | 82 | */ |
83 | |||
84 | // global/process polyfills | ||
85 | |||
86 | ;(window as any).global = window; | ||
87 | ;(window as any).process = require('process/'); | ||
88 | ;(window as any).Buffer = require('buffer/').Buffer; | ||
diff --git a/client/src/shims/http.ts b/client/src/shims/http.ts new file mode 100644 index 000000000..a759400cb --- /dev/null +++ b/client/src/shims/http.ts | |||
@@ -0,0 +1 @@ | |||
module.exports = require('stream-http'); \ No newline at end of file | |||
diff --git a/client/src/shims/https.ts b/client/src/shims/https.ts new file mode 100644 index 000000000..1da6f8adb --- /dev/null +++ b/client/src/shims/https.ts | |||
@@ -0,0 +1 @@ | |||
module.exports = require('https-browserify'); \ No newline at end of file | |||
diff --git a/client/src/shims/noop.ts b/client/src/shims/noop.ts new file mode 100644 index 000000000..338e16104 --- /dev/null +++ b/client/src/shims/noop.ts | |||
@@ -0,0 +1,3 @@ | |||
1 | // Does nothing. Used to shim out node.js modules | ||
2 | // which are no-ops in the browser. | ||
3 | export const NOOP = 0; \ No newline at end of file | ||
diff --git a/client/src/shims/path.ts b/client/src/shims/path.ts new file mode 100644 index 000000000..74b6913d8 --- /dev/null +++ b/client/src/shims/path.ts | |||
@@ -0,0 +1 @@ | |||
module.exports = require('path-browserify'); \ No newline at end of file | |||