There was an error while loading. Please reload this page.
1 parent 85f07ca commit 6508469Copy full SHA for 6508469
1 file changed
lib/utils/get-webpack-version.js
@@ -1,4 +1,8 @@
1
// eslint-disable-next-line import/no-extraneous-dependencies
2
+// require.main is undefined while running WebStorm code assistance analyzer of webpack.config.js
3
+if (!require.main) {
4
+ require.main = { require };
5
+}
6
const webpackVersion = require.main.require('webpack/package.json').version;
7
8
/**
0 commit comments