rsnext/packages/next/next-server/lib/router-context.ts
Tim Neutkens 9b098f549a
Add sourcemaps to Next.js core compilation (#13049)
* Generate sourcemaps for core files that pass through Babel

* Run files through Babel instead of tsc

* Get rid of wildcard helper

* Get rid of wildcard helper

* Remove unused file

* Update wildcard imports

* Add exclude

* Get rid of object-assign helper

* Use Object.assign as it gives better output

Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-05-19 09:09:59 +02:00

8 lines
240 B
TypeScript

import React from 'react'
import { NextRouter } from './router/router'
export const RouterContext = React.createContext<NextRouter>(null as any)
if (process.env.NODE_ENV !== 'production') {
RouterContext.displayName = 'RouterContext'
}