1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

fix : example/with-noscript to use next@latest and react-dom (#3237)

* example with-noscript use next@latest

* fix : example/with-noscript react-dom/server usage

Since the update to react ^16.0.0 react-dom import location has changed
This commit is contained in:
Andy Kenward 2017-11-04 10:25:39 +00:00 committed by Tim Neutkens
parent c29ec6bdd0
commit 8bb31f0960
3 changed files with 3 additions and 3 deletions

View file

@ -1,5 +1,5 @@
import React from 'react'
import ReactDOMServer from 'react-dom/lib/ReactDOMServer'
import ReactDOMServer from 'react-dom/server'
export default function Noscript (props) {
const staticMarkup = ReactDOMServer.renderToStaticMarkup(props.children)

View file

@ -2,7 +2,7 @@ module.exports = {
webpack: (config, { dev }) => {
if (!dev) {
config.resolve.alias = {
'react-dom/server': require.resolve('react-dom/dist/react-dom-server.min.js')
'react-dom/server': require.resolve('react-dom/umd/react-dom-server.browser.production.min.js')
}
}
return config

View file

@ -7,7 +7,7 @@
"start": "next start"
},
"dependencies": {
"next": "^3.0.3",
"next": "latest",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-lazyload": "^2.2.7"