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:
parent
c29ec6bdd0
commit
8bb31f0960
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue