mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
use webpack/hot/dev-server to full-reload on HMR errors
This commit is contained in:
parent
165431bdc7
commit
a9c0ae3498
|
@ -13,7 +13,7 @@ export default async function createCompiler (dir, { hotReload = false } = {}) {
|
|||
const pages = await glob('pages/**/*.js', { cwd: dir })
|
||||
|
||||
const entry = {}
|
||||
const defaultEntries = hotReload ? ['webpack/hot/only-dev-server'] : []
|
||||
const defaultEntries = hotReload ? ['webpack/hot/dev-server'] : []
|
||||
for (const p of pages) {
|
||||
entry[join('bundles', p)] = defaultEntries.concat(['./' + p])
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue