GoScrobble/web/node_modules/@pmmmwh/react-refresh-webpack-plugin/lib/globals.js

14 lines
459 B
JavaScript
Raw Normal View History

2022-04-25 02:47:15 +00:00
const { version } = require('webpack');
// Parse Webpack's major version: x.y.z => x
const webpackVersion = parseInt(version || '', 10);
let webpackGlobals = {};
if (webpackVersion === 5) {
webpackGlobals = require('webpack/lib/RuntimeGlobals');
}
module.exports.webpackVersion = webpackVersion;
module.exports.webpackRequire = webpackGlobals.require || '__webpack_require__';
module.exports.refreshGlobal = `${module.exports.webpackRequire}.$Refresh$`;