From c2fda755602776ddaf23bbb7b1e7bf884074f9b0 Mon Sep 17 00:00:00 2001 From: Jason Grout Date: Fri, 11 Jun 2021 09:13:31 -0700 Subject: [PATCH] =?UTF-8?q?Add=20=E2=80=98process=E2=80=99=20definition=20?= =?UTF-8?q?for=20blueprint=20in=20webpack=205.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/palantir/blueprint/issues/4393 --- packages/html-manager/test/webpack.conf.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/html-manager/test/webpack.conf.js b/packages/html-manager/test/webpack.conf.js index 4d5d2f645f0..befb9af33ba 100644 --- a/packages/html-manager/test/webpack.conf.js +++ b/packages/html-manager/test/webpack.conf.js @@ -1,5 +1,6 @@ var path = require('path'); var postcss = require('postcss'); +const webpack = require('webpack'); module.exports = { mode: 'development', @@ -90,4 +91,12 @@ module.exports = { }, ], }, + plugins: [ + new webpack.DefinePlugin({ + // Needed for Blueprint. See https://github.com/palantir/blueprint/issues/4393 + 'process.env': '{}', + // Needed for various packages using cwd(), like the path polyfill + process: { cwd: () => '/' } + }) + ] };