Skip to content

Commit

Permalink
Merge branch 'master' into fix-access-control-args
Browse files Browse the repository at this point in the history
  • Loading branch information
JedWatson authored Oct 30, 2020
2 parents 41943ae + d91a638 commit d6f7996
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages-next/admin-ui/src/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
* packages import the same instance of next's router.
*/

export * from 'next/router';
// not using export * because Rollup's CJS re-export code doesn't ignore __esModule on the exports object so it will re-define it if it exists
// and since __esModule isn't configurable(at least with the code that's _generally_ emitted by Rollup, Babel, tsc and etc.)
// an error will be thrown
// that's normally not a problem because modules generally use Object.defineProperty(exports, '__esModule', { value: true })
// which means that the property isn't enumerable but Next uses Babel's loose mode and Babel's loose mode for the CJS transform
// uses exports.__esModule = true instead of defineProperty so the property is enumerable
export { createRouter, makePublicRouterInstance, Router, useRouter, withRouter } from 'next/router';
export type { NextRouter } from 'next/router';

import NextLink, { LinkProps as NextLinkProps } from 'next/link';
import React, { AnchorHTMLAttributes } from 'react';

Expand Down

0 comments on commit d6f7996

Please sign in to comment.