From b32f595329dda86f0e0a9a5e35a72867f959e941 Mon Sep 17 00:00:00 2001 From: Andy Kenward Date: Sat, 4 Nov 2017 10:25:39 +0000 Subject: [PATCH] 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 --- examples/with-noscript/components/Noscript.js | 2 +- examples/with-noscript/next.config.js | 2 +- examples/with-noscript/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/with-noscript/components/Noscript.js b/examples/with-noscript/components/Noscript.js index f7ed7be45e4389..6dc373552ef3d8 100644 --- a/examples/with-noscript/components/Noscript.js +++ b/examples/with-noscript/components/Noscript.js @@ -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) diff --git a/examples/with-noscript/next.config.js b/examples/with-noscript/next.config.js index 154a275e67120b..4736a929fcadfa 100644 --- a/examples/with-noscript/next.config.js +++ b/examples/with-noscript/next.config.js @@ -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 diff --git a/examples/with-noscript/package.json b/examples/with-noscript/package.json index 14cc7d3b91cd98..b1bf1cc41fc553 100644 --- a/examples/with-noscript/package.json +++ b/examples/with-noscript/package.json @@ -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"