1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Move on-demand-entries-ping to _next namespace (#1305)

This commit is contained in:
Tim Neutkens 2017-02-27 21:04:01 +01:00 committed by Guillermo Rauch
parent 01fa65d4a2
commit b37431461d
2 changed files with 2 additions and 2 deletions

View file

@ -5,7 +5,7 @@ import fetch from 'unfetch'
async function ping () {
try {
const url = `/on-demand-entries-ping?page=${Router.pathname}`
const url = `/_next/on-demand-entries-ping?page=${Router.pathname}`
const res = await fetch(url)
const payload = await res.json()
if (payload.invalid) {

View file

@ -103,7 +103,7 @@ export default function onDemandEntryHandler (devMiddleware, compiler, {
middleware () {
return function (req, res, next) {
if (!/^\/on-demand-entries-ping/.test(req.url)) return next()
if (!/^\/_next\/on-demand-entries-ping/.test(req.url)) return next()
const { query } = parse(req.url, true)
const page = normalizePage(query.page)