Skip to content

Commit

Permalink
fix nml upload by providing process browser shim (#5987)
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-wer authored Jan 24, 2022
1 parent a62e814 commit 4d164d9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
"nanoevents": "^5.1.8",
"pako": "^0.2.8",
"pretty-bytes": "^5.1.0",
"process": "^0.11.10",
"protobufjs": "^6.8.6",
"react": "^16.12.0",
"react-debounce-render": "^6.0.0",
Expand Down
10 changes: 9 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ module.exports = function(env = {}) {
"process.env.BABEL_ENV": process.env.BABEL_ENV,
}),
new webpack.IgnorePlugin({ resourceRegExp: /^\.\/locale$/, contextRegExp: /moment$/ }),
new webpack.ProvidePlugin({
// Needed for saxophone, i.e. readable-stream, since it is used without importing
// Corresponding issue: https://github.com/nodejs/readable-stream/issues/450
process: "process/browser",
}),
new MiniCssExtractPlugin({
filename: "[name].css",
chunkFilename: "[name].css",
Expand Down Expand Up @@ -139,7 +144,10 @@ module.exports = function(env = {}) {
alias: {
react: path.resolve("./node_modules/react"),
},
fallback: { url: require.resolve("url/") },
fallback: {
// Needed for jsonschema
url: require.resolve("url/"),
},
},
optimization: {
minimize: env.production,
Expand Down

0 comments on commit 4d164d9

Please sign in to comment.