diff --git a/components/advanced/babel-plugin.js b/components/advanced/babel-plugin.js index c9b82c45..248a0efe 100644 --- a/components/advanced/babel-plugin.js +++ b/components/advanced/babel-plugin.js @@ -163,9 +163,9 @@ const BabelPlugin = () => We also transpile styled-components tagged template literals down to a smaller representation than what Babel normally does, because styled-components template literals don't need to - be 100% spec compliant. see{' '} + be 100% spec compliant. Read more about{' '} Tagged Template Literals for - more information about that) You can use the {' '} + more information about this. You can use the {' '} transpileTemplateLiterals option to turn this feature off.

diff --git a/package.json b/package.json index 52ff4e41..ac311fac 100644 --- a/package.json +++ b/package.json @@ -9,23 +9,23 @@ "test": "jest" }, "dependencies": { - "babel-plugin-polished": "^1.0.3", - "babel-plugin-styled-components": "^1.1.4", + "babel-plugin-polished": "^1.1.0", + "babel-plugin-styled-components": "^1.1.7", "express": "^4.15.2", "isomorphic-fetch": "^2.2.1", "lru-cache": "^4.0.2", "module-alias": "^2.0.0", - "next": "^2.4.0", - "polished": "^1.0.2", - "preact": "^8.1.0", - "preact-compat": "^3.14.3", + "next": "./vendor/next-v2.4.8.tgz", + "polished": "^1.3.0", + "preact": "^8.2.1", + "preact-compat": "^3.16.0", "prismjs": "^1.6.0", - "react": "^15.4.2", - "react-dom": "^15.4.2", - "react-live": "^1.5.2", + "react": "^15.6.1", + "react-dom": "^15.6.1", + "react-live": "^1.7.0", "react-octicons-svg": "^1.1.13", - "styled-components": "^2.0.0", - "sw-precache-webpack-plugin": "^0.9.1", + "styled-components": "^2.1.1", + "sw-precache-webpack-plugin": "^0.11.4", "webpack-bundle-analyzer": "^2.4.0" }, "devDependencies": { diff --git a/pages/_document.js b/pages/_document.js index 5394e659..c77b00bc 100644 --- a/pages/_document.js +++ b/pages/_document.js @@ -145,10 +145,20 @@ const resetStyles = ` const description = 'Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅' export default class MyDocument extends Document { - render () { + static getInitialProps ({ renderPage }) { const sheet = new ServerStyleSheet() - const main = sheet.collectStyles(
) - const styleTags = sheet.getStyleElement() + + const page = renderPage(Component => props => + sheet.collectStyles( + )) + + const styles = sheet.getStyleElement() + + return { ...page, styles } + } + + render () { + const { styles } = this.props return ( @@ -194,12 +204,13 @@ export default class MyDocument extends Document {