1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/packages/next-server/server
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
..
lib Handle decoding errors correctly (#5589) 2018-11-04 01:22:33 +01:00
config.js Remove flow types (#5704) 2018-11-21 16:04:37 +01:00
get-dynamic-import-bundles.ts Convert render.js to typescript (#5869) 2018-12-13 01:00:46 +01:00
get-page-files.ts Move getPageFiles and convert to ts (#5841) 2018-12-07 13:35:01 +01:00
next-server.ts Make sure 404 is rendered (#5880) 2018-12-13 19:46:16 +01:00
render.tsx Change page export validity check on client and server in development (#5857) 2018-12-17 16:09:23 +01:00
require.ts Convert render.js to typescript (#5869) 2018-12-13 01:00:46 +01:00
router.ts Convert next-server.js to typescript (#5844) 2018-12-09 22:46:45 +01:00
send-html.ts Convert next-server.js to typescript (#5844) 2018-12-09 22:46:45 +01:00
serve-static.ts Move serve-static to typescript (#5833) 2018-12-06 16:54:33 +01:00
utils.ts Convert next-server.js to typescript (#5844) 2018-12-09 22:46:45 +01:00