No idea why but it's much better now
blog/.vscode/settings.jsonnew file+4
@@ -0,0 +1,4 @@
2+ "workbench.preferredDarkColorTheme": "Base2Tone_HeathDark",
3+ "workbench.colorTheme": "Base2Tone_FieldDark"
blog/gatsby-browser.jsnew file+21
@@ -0,0 +1,21 @@
1+import React from "react";
2+import {JssProvider, SheetsRegistry} from 'react-jss'
4+export const onInitialClientRender = () => {
5+ if (process.env.BUILD_STAGE === `develop`) {
9+ // Remove the server-side injected CSS.
10+ const jssStyles = document.querySelector(`#jss-server-side`);
12+ jssStyles.parentNode.removeChild(jssStyles);
16+export const wrapRootElement = ({ element }) => {
19+// return <StylesProvider {...stylesProvider}>{element}</StylesProvider>;
20+// return <JssProvider registry={sheets}>{element}</JssProvider>
blog/gatsby-node.jsnew file
No changes to the content.
blog/gatsby-ssr.jsnew file+37
@@ -0,0 +1,37 @@
1+import React from 'react'
2+import {JssProvider, SheetsRegistry} from 'react-jss'
4+const globalLeak = new Map();
6+export const wrapRootElement = ({ element, pathname }) => {
7+ const sheets = new SheetsRegistry()
8+ globalLeak.set(pathname, sheets);
10+ return <JssProvider registry={sheets}>{element}</JssProvider>
13+export const onRenderBody = (
14+ { setHeadComponents, pathname },
16+ const sheets = globalLeak.get(pathname);
22+ const css = sheets.toString();
24+ // css = disableAutoprefixing ? css : autoprefixer(css, pathname);
25+ // css = disableMinification ? css : cleanCSS.minify(css).styles;
30+ key="jss-server-side"
31+ dangerouslySetInnerHTML={{ __html: css }}
35+ globalLeak.delete(pathname);
@@ -8875,6 +8875,14 @@
8875 "@babel/runtime": "^7.2.0"
8875 "@babel/runtime": "^7.2.0"
8878+ "gatsby-plugin-better-jss": {
8879+ "version": "1.0.3",
8880+ "resolved": "https://registry.npmjs.org/gatsby-plugin-better-jss/-/gatsby-plugin-better-jss-1.0.3.tgz",
8881+ "integrity": "sha512-1NG68s+8vpknG4CpaH7a3ac0NItWNsk8HWma9wr+NnuCYM8buBnE1MbYzbycKYkjNZZ6DAeISJpKqtbheJPyYg==",
8883+ "@babel/runtime": "^7.0.0"
8878 "gatsby-plugin-manifest": {
8886 "gatsby-plugin-manifest": {
8879 "version": "2.3.3",
8887 "version": "2.3.3",
8880 "resolved": "https://registry.npmjs.org/gatsby-plugin-manifest/-/gatsby-plugin-manifest-2.3.3.tgz",
8888 "resolved": "https://registry.npmjs.org/gatsby-plugin-manifest/-/gatsby-plugin-manifest-2.3.3.tgz",
@@ -11,6 +11,7 @@
11 "gatsby": "^2.19.45",
11 "gatsby": "^2.19.45",
12 "gatsby-image": "^2.2.8",
12 "gatsby-image": "^2.2.8",
13 "gatsby-plugin-alias-imports": "^1.0.5",
13 "gatsby-plugin-alias-imports": "^1.0.5",
14+ "gatsby-plugin-better-jss": "^1.0.3",
14 "gatsby-plugin-manifest": "^2.3.2",
15 "gatsby-plugin-manifest": "^2.3.2",
15 "gatsby-plugin-mdx": "^1.0.0",
16 "gatsby-plugin-mdx": "^1.0.0",
16 "gatsby-plugin-offline": "^2.2.4",
17 "gatsby-plugin-offline": "^2.2.4",