1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/server/build/loaders/hot-self-accept-loader.js
2016-10-17 10:57:51 +09:00

15 lines
301 B
JavaScript

module.exports = function (content) {
this.cacheable()
return content + `
if (module.hot) {
module.hot.accept()
if ('idle' !== module.hot.status()) {
const Component = module.exports.default || module.exports
next.router.notify({ Component })
}
}
`
}