From 3bf4e10902b132682201c55edfc2a39437587ec4 Mon Sep 17 00:00:00 2001 From: Thibaud Colas Date: Wed, 7 Jun 2017 16:21:12 +0300 Subject: [PATCH] Add best practice node modules aliasing --- client/webpack/base.config.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client/webpack/base.config.js b/client/webpack/base.config.js index 50f08a1d4..a314a6991 100644 --- a/client/webpack/base.config.js +++ b/client/webpack/base.config.js @@ -61,5 +61,12 @@ module.exports = function exports() { // Add webpack version information version: false, }, + // Some libraries import Node modules but don't use them in the browser. + // Tell Webpack to provide empty mocks for them so importing them works. + node: { + fs: 'empty', + net: 'empty', + tls: 'empty', + }, }; };