UNPKG

5.74 kBSource Map (JSON)View Raw
1{"version":3,"sources":["../../client/next-dev.js"],"names":["__REPLACE_NOOP_IMPORT__","window","EventSource","EventSourcePolyfill","__NEXT_DATA__","assetPrefix","prefix","webpackHMR","next","then","renderCtx","render","buildIndicatorHandler","devPagesManifestListener","event","data","indexOf","fetch","res","json","manifest","__DEV_PAGES_MANIFEST","catch","err","console","log","pages","JSON","parse","router","clc","includes","pathname","clearIndicator","replace","String","querystring","assign","urlQueryToSearchParams","query","URLSearchParams","location","search","asPath","finally","unfiltered","process","env","__NEXT_BUILD_INDICATOR","handler","error"],"mappings":"qLACA,gDACA,wFACA,6FACA,uGACA,gFACA,gCACA,4DACA,gGARA,qC,CAUA;AACA;AACA;AACA;AACA;AACAA,uBAAuB,CAEvB;AACA,GAAI,CAACC,MAAM,CAACC,WAAZ,CAAyB,CACvBD,MAAM,CAACC,WAAP,CAAqBC,4BAArB,CACD,CAED,KAAM,CACJC,aAAa,CAAE,CAAEC,WAAF,CADX,EAEFJ,MAFJ,CAIA,KAAMK,CAAAA,MAAM,CAAGD,WAAW,EAAI,EAA9B,CACA,KAAME,CAAAA,UAAU,CAAG,yCAAnB,CAEAN,MAAM,CAACO,IAAP,CAAcA,IAAd,CACA,iBAAS,CAAED,UAAF,CAAT,EACGE,IADH,CACQ,CAAC,CAAEC,SAAF,CAAaC,MAAb,CAAD,GAA2B,CAC/B,mCAAoB,CAAEN,WAAW,CAAEC,MAAf,CAApB,EAEA,GAAIM,CAAAA,qBAAqB,CAAG,IAAM,CAAE,CAApC,CAEA,QAASC,CAAAA,wBAAT,CAAkCC,KAAlC,CAAyC,CACvC,GAAIA,KAAK,CAACC,IAAN,CAAWC,OAAX,CAAmB,kBAAnB,IAA2C,CAAC,CAAhD,CAAmD,CACjDC,KAAK,CAAE,GAAEX,MAAO,kDAAX,CAAL,CACGG,IADH,CACSS,GAAD,EAASA,GAAG,CAACC,IAAJ,EADjB,EAEGV,IAFH,CAESW,QAAD,EAAc,CAClBn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H,CAyDUC,GAAD,EAAS,CACdC,OAAO,CAAC0B,KAAR,CAAc,sBAAd,CAAsC3B,GAAtC,EACD,CA3DH","sourcesContent":["/* globals __REPLACE_NOOP_IMPORT__ */\nimport initNext, * as next from './'\nimport EventSourcePolyfill from './dev/event-source-polyfill'\nimport initOnDemandEntries from './dev/on-demand-entries-client'\nimport initWebpackHMR from './dev/webpack-hot-middleware-client'\nimport initializeBuildWatcher from './dev/dev-build-watcher'\nimport { displayContent } from './dev/fouc'\nimport { addMessageListener } from './dev/error-overlay/eventsource'\nimport * as querystring from '../next-server/lib/router/utils/querystring'\n\n// Temporary workaround for the issue described here:\n// https://github.com/vercel/next.js/issues/3775#issuecomment-407438123\n// The runtimeChunk doesn't have dynamic import handling code when there hasn't been a dynamic import\n// The runtimeChunk can't hot reload itself currently to correct it when adding pages using on-demand-entries\n// eslint-disable-next-line no-unused-expressions\n__REPLACE_NOOP_IMPORT__\n\n// Support EventSource on Internet Explorer 11\nif (!window.EventSource) {\n window.EventSource = EventSourcePolyfill\n}\n\nconst {\n __NEXT_DATA__: { assetPrefix },\n} = window\n\nconst prefix = assetPrefix || ''\nconst webpackHMR = initWebpackHMR()\n\nwindow.next = next\ninitNext({ webpackHMR })\n .then(({ renderCtx, render }) => {\n initOnDemandEntries({ assetPrefix: prefix })\n\n let buildIndicatorHandler = () => {}\n\n function devPagesManifestListener(event) {\n if (event.data.indexOf('devPagesManifest') !== -1) {\n fetch(`${prefix}/_next/static/development/_devPagesManifest.json`)\n .then((res) => res.json())\n .then((manifest) => {\n window.__DEV_PAGES_MANIFEST = manifest\n })\n .catch((err) => {\n console.log(`Failed to fetch devPagesManifest`, err)\n })\n } else if (event.data.indexOf('serverOnlyChanges') !== -1) {\n const { pages } = JSON.parse(event.data)\n const router = window.next.router\n\n if (!router.clc && pages.includes(router.pathname)) {\n console.log('Refreshing page data due to server-side change')\n\n buildIndicatorHandler('building')\n\n const clearIndicator = () => buildIndicatorHandler('built')\n\n router\n .replace(\n router.pathname +\n '?' +\n String(\n querystring.assign(\n querystring.urlQueryToSearchParams(router.query),\n new URLSearchParams(location.search)\n )\n ),\n router.asPath\n )\n .finally(clearIndicator)\n }\n }\n }\n devPagesManifestListener.unfiltered = true\n addMessageListener(devPagesManifestListener)\n\n if (process.env.__NEXT_BUILD_INDICATOR) {\n initializeBuildWatcher((handler) => {\n buildIndicatorHandler = handler\n })\n }\n\n // delay rendering until after styles have been applied in development\n displayContent(() => {\n render(renderCtx)\n })\n })\n .catch((err) => {\n console.error('Error was not caught', err)\n })\n"]}
\No newline at end of file