Skip to content

Commit e19fb5c

Browse files
authored
Merge pull request #53 from intento/CON-2535_fix-runtime
CON-2535 -- fix runtime, + more vulnerabilities
2 parents 72eaae4 + 79cf208 commit e19fb5c

File tree

3 files changed

+626
-8
lines changed

3 files changed

+626
-8
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"eslint": "^8.42.0",
5151
"https-browserify": "^1.0.0",
5252
"jest": "^29.5.0",
53+
"node-stdlib-browser": "^1.2.0",
5354
"rimraf": "^5.0.1",
5455
"stream-http": "^3.2.0",
5556
"url": "^0.11.0",

webpack.config.js

+11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
const path = require('path')
2+
const webpack = require('webpack')
3+
const stdLibBrowser = require('node-stdlib-browser')
24

35
const resolve = {
46
fallback: {
@@ -9,6 +11,13 @@ const resolve = {
911
},
1012
}
1113

14+
const plugins = [
15+
new webpack.ProvidePlugin({
16+
process: stdLibBrowser.process,
17+
Buffer: [stdLibBrowser.buffer, 'Buffer'],
18+
}),
19+
]
20+
1221
const serverDevConfig = {
1322
entry: './src/build.js',
1423
target: 'node',
@@ -43,6 +52,7 @@ const clientDevConfig = {
4352
hashFunction: 'xxhash64',
4453
},
4554
resolve,
55+
plugins,
4656
}
4757

4858
const clientConfig = {
@@ -55,6 +65,7 @@ const clientConfig = {
5565
hashFunction: 'xxhash64',
5666
},
5767
resolve,
68+
plugins,
5869
}
5970

6071
module.exports = [serverDevConfig, serverConfig, clientDevConfig, clientConfig]

0 commit comments

Comments
 (0)