Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8bb31f0

Browse files
andykenwardtimneutkens
authored andcommitted
fix : example/with-noscript to use next@latest and react-dom (vercel#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
1 parent c29ec6b commit 8bb31f0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

‎examples/with-noscript/components/Noscript.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react'
2-
import ReactDOMServer from 'react-dom/lib/ReactDOMServer'
2+
import ReactDOMServer from 'react-dom/server'
33

44
export default function Noscript (props) {
55
const staticMarkup = ReactDOMServer.renderToStaticMarkup(props.children)

‎examples/with-noscript/next.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module.exports = {
22
webpack: (config, { dev }) => {
33
if (!dev) {
44
config.resolve.alias = {
5-
'react-dom/server': require.resolve('react-dom/dist/react-dom-server.min.js')
5+
'react-dom/server': require.resolve('react-dom/umd/react-dom-server.browser.production.min.js')
66
}
77
}
88
return config

‎examples/with-noscript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"start": "next start"
88
},
99
"dependencies": {
10-
"next": "^3.0.3",
10+
"next": "latest",
1111
"react": "^16.0.0",
1212
"react-dom": "^16.0.0",
1313
"react-lazyload": "^2.2.7"

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /