Unverified Commit b88addfc authored by Tim Neutkens's avatar Tim Neutkens Committed by GitHub

Remove event-source-polyfill dependency (#6407)

parent a99323cb
...@@ -63,7 +63,7 @@ export function formatWithValidation (url, options) { ...@@ -63,7 +63,7 @@ export function formatWithValidation (url, options) {
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
if (url !== null && typeof url === 'object') { if (url !== null && typeof url === 'object') {
Object.keys(url).forEach((key) => { Object.keys(url).forEach((key) => {
if (!urlObjectKeys.includes(key)) { if (urlObjectKeys.indexOf(key) === -1) {
console.warn(`Unknown key passed via urlObject into url.format: ${key}`) console.warn(`Unknown key passed via urlObject into url.format: ${key}`)
} }
}) })
......
This diff is collapsed.
import initNext, * as next from './' import initNext, * as next from './'
import EventSourcePolyfill from './event-source-polyfill'
import initOnDemandEntries from './on-demand-entries-client' import initOnDemandEntries from './on-demand-entries-client'
import initWebpackHMR from './webpack-hot-middleware-client' import initWebpackHMR from './webpack-hot-middleware-client'
...@@ -8,6 +9,11 @@ import initWebpackHMR from './webpack-hot-middleware-client' ...@@ -8,6 +9,11 @@ import initWebpackHMR from './webpack-hot-middleware-client'
// The runtimeChunk can't hot reload itself currently to correct it when adding pages using on-demand-entries // The runtimeChunk can't hot reload itself currently to correct it when adding pages using on-demand-entries
// REPLACE_NOOP_IMPORT // REPLACE_NOOP_IMPORT
// Support EventSource on Internet Explorer 11
if (!window.EventSource) {
window.EventSource = EventSourcePolyfill
}
const { const {
__NEXT_DATA__: { __NEXT_DATA__: {
assetPrefix assetPrefix
......
import 'event-source-polyfill'
import connect from './dev-error-overlay/hot-dev-client' import connect from './dev-error-overlay/hot-dev-client'
export default ({ assetPrefix }) => { export default ({ assetPrefix }) => {
const options = { const options = {
path: `${assetPrefix}/_next/webpack-hmr` path: `${assetPrefix}/_next/webpack-hmr`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment