Skip to content

Commit e8b6c51

Browse files
committed
Fix example webpack config to work with jlab dependencies.
1 parent 05940d9 commit e8b6c51

File tree

4 files changed

+39
-3
lines changed

4 files changed

+39
-3
lines changed

examples/web1/webpack.config.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
var path = require('path');
2+
var webpack = require('webpack');
23

34
module.exports = {
45
mode: 'development',
@@ -14,5 +15,13 @@ module.exports = {
1415
// jquery-ui loads some images
1516
{ test: /\.(jpg|png|gif)$/, use: 'file-loader' }
1617
]
17-
}
18+
},
19+
plugins: [
20+
new webpack.DefinePlugin({
21+
// Needed for Blueprint. See https://github.com/palantir/blueprint/issues/4393
22+
'process.env': '{}',
23+
// Needed for various packages using cwd(), like the path polyfill
24+
process: { cwd: () => '/' }
25+
})
26+
]
1827
};

examples/web2/webpack.config.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
var path = require('path');
2+
var webpack = require('webpack');
23

34
module.exports = {
45
mode: 'development',
@@ -57,5 +58,13 @@ module.exports = {
5758
}
5859
}
5960
]
60-
}
61+
},
62+
plugins: [
63+
new webpack.DefinePlugin({
64+
// Needed for Blueprint. See https://github.com/palantir/blueprint/issues/4393
65+
'process.env': '{}',
66+
// Needed for various packages using cwd(), like the path polyfill
67+
process: { cwd: () => '/' }
68+
})
69+
]
6170
};

examples/web3/webpack.config.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const postcss = require('postcss');
22
var path = require('path');
3+
var webpack = require('webpack');
34

45
module.exports = {
56
mode: 'development',
@@ -88,5 +89,13 @@ module.exports = {
8889
}
8990
}
9091
]
91-
}
92+
},
93+
plugins: [
94+
new webpack.DefinePlugin({
95+
// Needed for Blueprint. See https://github.com/palantir/blueprint/issues/4393
96+
'process.env': '{}',
97+
// Needed for various packages using cwd(), like the path polyfill
98+
process: { cwd: () => '/' }
99+
})
100+
]
92101
};

examples/web4/webpack.config.js

+9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
var path = require('path');
2+
var webpack = require('webpack');
23

34
module.exports = {
45
mode: 'development',
@@ -57,4 +58,12 @@ module.exports = {
5758
},
5859
],
5960
},
61+
plugins: [
62+
new webpack.DefinePlugin({
63+
// Needed for Blueprint. See https://github.com/palantir/blueprint/issues/4393
64+
'process.env': '{}',
65+
// Needed for various packages using cwd(), like the path polyfill
66+
process: { cwd: () => '/' }
67+
})
68+
]
6069
};

0 commit comments

Comments
 (0)