Added ExtractTextPlugin and configured to extract a global css file (components.css) from all global elements. Singlepage (anything inside /pages directory) is still loaded via js.
Best solution I could come up with here required hard-coding the tag to components.css in the render output in components/10-html/html.jsx. This is a bit of a hack, but does achieve the goal of eliminating or reducing FOUC.
TODO:
Possibly replace hard-coded link in html.jsx -- figure out how to reference external css using node/jsx functions.
Dynamically reference external css files from each singlepage. This requires solving TODO #1.
NOTE: also noticed an error in my previous commit to add 2nd and 3rd level items to breadcrumb. Fixed this error in singlepage.jsx.
Added ExtractTextPlugin and configured to extract a global css file (components.css) from all global elements. Singlepage (anything inside /pages directory) is still loaded via js.
Best solution I could come up with here required hard-coding the tag to components.css in the render output in components/10-html/html.jsx. This is a bit of a hack, but does achieve the goal of eliminating or reducing FOUC.
TODO:
NOTE: also noticed an error in my previous commit to add 2nd and 3rd level items to breadcrumb. Fixed this error in singlepage.jsx.