Skip to content

Commit c2fda75

Browse files
committed
Add ‘process’ definition for blueprint in webpack 5.
See palantir/blueprint#4393
1 parent 67aa314 commit c2fda75

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/html-manager/test/webpack.conf.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
var path = require('path');
22
var postcss = require('postcss');
3+
const webpack = require('webpack');
34

45
module.exports = {
56
mode: 'development',
@@ -90,4 +91,12 @@ module.exports = {
9091
},
9192
],
9293
},
94+
plugins: [
95+
new webpack.DefinePlugin({
96+
// Needed for Blueprint. See https://github.com/palantir/blueprint/issues/4393
97+
'process.env': '{}',
98+
// Needed for various packages using cwd(), like the path polyfill
99+
process: { cwd: () => '/' }
100+
})
101+
]
93102
};

0 commit comments

Comments
 (0)