UNPKG

@pmmmwh/react-refresh-webpack-plugin

Version:

An **EXPERIMENTAL** Webpack plugin to enable "Fast Refresh" (also previously known as _Hot Reloading_) for React components.

9 lines (8 loc) 371 B
/** * Gets current bundle's global scope identifier for React Refresh. * @param {Record<string, string>} runtimeGlobals The Webpack runtime globals. * @returns {string} The React Refresh global scope within the Webpack bundle. */ module.exports.getRefreshGlobalScope = (runtimeGlobals) => { return `${runtimeGlobals.require || '__webpack_require__'}.$Refresh$`; };