Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/**
* Registers a refresh to react-refresh.
* @param {string} [type] A valid type of a module.
* @param {number} [id] An ID of a module.
* @returns {void}
*/
window.$RefreshReg$ = function(type, id) {
const typeId = moduleId + ' ' + id;
Refresh.register(type, typeId);
};
/**
* Creates a module signature function from react-refresh.
* @returns {function(string): string} A created signature function.
*/
window.$RefreshSig$ = Refresh.createSignatureFunctionForTransform;
// Restore to previous refresh functions after initialization
return function cleanup() {
window.$RefreshReg$ = prevRefreshReg;
window.$RefreshSig$ = prevRefreshSig;
};
};
}
module.exports.prelude = function(module) {
window.$RefreshReg$ = function(type, id) {
Refresh.register(type, module.id + ' ' + id);
};
window.$RefreshSig$ = Refresh.createSignatureFunctionForTransform;
};