- Replaces taskr-babel with taskr-typescript for the `next` package
- Makes sure Node 8+ is used, no unneeded transpilation
- Compile Next.js client side files through babel the same way pages are
- Compile Next.js client side files to esmodules, not commonjs, so that tree shaking works.
- Move error-debug.js out of next-server as it's only used/require in development
- Drop ansi-html as dependency from next-server
- Make next/link esmodule (for tree-shaking)
- Make next/router esmodule (for tree-shaking)
- add typescript compilation to next-server
- Remove last remains of Flow
- Move hoist-non-react-statics to next, out of next-server
- Move htmlescape to next, out of next-server
- Remove runtime-corejs2 from next-server
In this example, we can:
- `QueryRenderer` SSR
- caching the data
- use the feature of `react-relay-network-modern` which is the powerful tool for `relay-modern`
I copy the example `with-relay-modern`, but I just modified the code. Some detail are not modified.
If you think this example is needed, I will fix those. Otherwise, close this **PR** to let me know this example is not needed.
- The with-firebase-auth example won't run unless a database with proper rules is created first.
- Add a small error callback to addDbListener to help with debugging if someone's database connection doesn't work.
**What's this PR?**
Based on the feedback on [this PR](https://github.com/zeit/next.js/pull/5722) @timneutkens asked me to create a test for `ssr: true`
**What's it do?**
- adds a test for setting `ssr: true` - /basic
- adds a test for setting `ssr: true` - /production
* Remove flow-typed
* Remove flow types
* Remove the last types
* Bring back taskr dependency
* Revert "Bring back taskr dependency"
This reverts commit 38cb95d7274d63fe63c6ac3c95ca358a28c17895.
* Bring back preset-flow as it’s used for tests
* Revert "Revert "Bring back taskr dependency""
This reverts commit b4c933ef133f4039f544fb10bf31d5c95d3b27a2.
On the server `props.initialMobxState` received by the `constructor` is a fully functioning mobx store that was instantiated by `getInitialProps()` only a few ticks earlier.
Thus, creating a new instance is unneccessary.
In the browser, however, `props.initialMobxState` is a hydrated plain object and thus the store needs to be initialized.
Extracting the logic that defines if a page is blocked to utils.
If that refactor make sense, I will create a next PR to cover both of the functions inside utils with tests.
* Add node_modules bundling under the —lambdas flag for next build
* Run minifier when lambdas mode is enabled
* Add lambdas option to next.config.js
* Add test for lambdas option
The current contributing.md instructions are outdated since the project uses yarn.
The problem:
Without installing yarn we have the following error/output:
`lerna ERR! yarn run prepublish exited ENOENT in 'next-server'`
Adding new instructions on how to install and run the project.
Current with-ant-design-less example has some problems.
- Upgrade next7, console found a 404 error.
![](https://user-gold-cdn.xitu.io/2018/11/11/167015fb80017e79?w=2606&h=1000&f=jpeg&s=124801)
> After upgrade next7, .next folder didn't find /static/style.css and there is /static/css/style.chunk.css.
- The /_next/static/style.css link don't need be placed in the <Head> tag. The style.chunk.css file will be add in the head tag automatically after build.
- The project with more pages include _app.js, _document.js...the antd-custom.less will not work well.
> The solution is use `modifyVars` of `lessLoaderOptions`. It work well in my project~