rsnext/packages/next/client
Kyle Holmberg 72e7929242 Change page export validity check on client and server in development (#5857)
Resolves #4055 

Credit: https://github.com/zeit/next.js/pull/5095

I didn't use the ignore webpack plugin from the original PR and tested bundle size with https://github.com/zeit/next.js/pull/5339 - seems to be safe on that front.

Was able to get tests to pass locally, unsure of what goes wrong in CI 🤷‍♂️ 

**Questions**
1) The initial PR didn't include changes to `next-server/lib/router` in `getRouteInfo()`. Should the same changes be made within?

2) Should we add a test for rendering a component created via `forwardRef()`?

`component-with-forwardedRef`:
```javascript
export default React.forwardRef((props, ref) => <span {...props} forwardedRef={ref}>This is a component with a forwarded ref</span>);
```

some test:
```javascript
test('renders from forwardRef', async () => {
  const $ = await get$('/component-with-forwardedRef')
  const span = $('span')
  expect(span.text()).toMatch(/This is a component with a forwarded ref/)
})
```
2018-12-17 16:09:23 +01:00
..
dev-error-overlay Monorepo (#5341) 2018-10-01 01:02:10 +02:00
error-boundary.js Remove flow types (#5704) 2018-11-21 16:04:37 +01:00
head-manager.js Monorepo (#5341) 2018-10-01 01:02:10 +02:00
index.js Change page export validity check on client and server in development (#5857) 2018-12-17 16:09:23 +01:00
link.js Use Typescript to transpile Next.js core files instead of Babel (#5747) 2018-11-28 15:03:02 +01:00
next-dev.js Monorepo (#5341) 2018-10-01 01:02:10 +02:00
next.js Monorepo (#5341) 2018-10-01 01:02:10 +02:00
noop.js Monorepo (#5341) 2018-10-01 01:02:10 +02:00
on-demand-entries-client.js Implement websockets based on-demand-entries ping (#4508) 2018-12-14 12:25:59 +01:00
page-loader.js Don’t prefetch on slow network / when datasaver is enabled (#5876) 2018-12-13 19:08:23 +01:00
router.js Make sure const/async is transpiled (#5760) 2018-11-28 17:53:49 +01:00
source-map-support.js Remove flow types (#5704) 2018-11-21 16:04:37 +01:00
webpack-hot-middleware-client.js Use Typescript to transpile Next.js core files instead of Babel (#5747) 2018-11-28 15:03:02 +01:00
with-router.js Make sure const/async is transpiled (#5760) 2018-11-28 17:53:49 +01:00