diff --git a/gatsby-node.js b/gatsby-node.js
index 32ead62..2784078 100644
--- a/gatsby-node.js
+++ b/gatsby-node.js
@@ -1,8 +1,20 @@
-exports.onCreateWebpackConfig = ({ actions }) => {
- actions.setWebpackConfig({
- node: {
- fs: 'empty'
- },
- })
- }
\ No newline at end of file
+
+exports.onCreateWebpackConfig = ({ stage, actions, getConfig }) => {
+ actions.setWebpackConfig({
+ node: {
+ fs: "empty",
+ },
+ })
+ //Ignore css order
+ if (stage === "build-javascript") {
+ const config = getConfig()
+ const miniCssExtractPlugin = config.plugins.find(
+ plugin => plugin.constructor.name === "MiniCssExtractPlugin"
+ )
+ if (miniCssExtractPlugin) {
+ miniCssExtractPlugin.options.ignoreOrder = true
+ }
+ actions.replaceWebpackConfig(config)
+ }
+}
diff --git a/src/components/layout.js b/src/components/layout.js
index ba60dcb..4a5ecc6 100644
--- a/src/components/layout.js
+++ b/src/components/layout.js
@@ -10,12 +10,14 @@ import PropTypes from "prop-types"
//import { useStaticQuery, graphql } from "gatsby"
//import Header from "./header"
+
import "./app-colors.css"
import "./layout.css"
-import Footer from './footer'
+let Footer = typeof window !== `undefined` ? require("./footer").default : null
+//import Footer from "./footer"
const Layout = ({ children }) => {
-/* const data = useStaticQuery(graphql`
+ /* const data = useStaticQuery(graphql`
query SiteTitleQuery {
site {
siteMetadata {
@@ -27,13 +29,11 @@ const Layout = ({ children }) => {
return (
<>
-
- {children}
-
+ {children}
+ {Footer && }{" "}
>
)
}
-
Layout.propTypes = {
children: PropTypes.node.isRequired,
}