diff --git a/package.json b/package.json index 8c305caef53..bebd691f790 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/webpack.config.js b/webpack.config.js index fbf88628cc2..fb4b0b97a58 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -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", @@ -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,