Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
fix(css): minified html and include css on load (#2739)
Browse files Browse the repository at this point in the history
  • Loading branch information
ovflowd authored Sep 10, 2022
1 parent ec7c6d6 commit fd57b87
Show file tree
Hide file tree
Showing 5 changed files with 171 additions and 8 deletions.
2 changes: 2 additions & 0 deletions gatsby-browser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import ReactIntlProvider from './src/containers/ReactIntl';
import { defaultLanguage, defaultMessages } from './locales';
import type { WrapPageElementBrowser } from './src/types';

import './src/styles/index.scss';

// eslint-disable-next-line import/prefer-default-export
export const wrapPageElement: WrapPageElementBrowser = ({ element, props }) => {
const { locale = defaultLanguage, intlMessages = defaultMessages } =
Expand Down
2 changes: 1 addition & 1 deletion gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const { localesAsString, defaultLanguage } = require('./locales');
const gatsbyConfig = {
flags: {
FAST_DEV: true,
DETECT_NODE_MUTATIONS: true,
PARALLEL_SOURCING: true,
},
pathPrefix: process.env.PATH_PREFIX,
Expand Down Expand Up @@ -229,6 +228,7 @@ const gatsbyConfig = {
},
'gatsby-plugin-sitemap',
'gatsby-plugin-meta-redirect',
'gatsby-plugin-minify-html',
],
};

Expand Down
172 changes: 167 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"gatsby-plugin-manifest": "^4.20.0",
"gatsby-plugin-mdx": "^3.20.0",
"gatsby-plugin-meta-redirect": "^1.1.1",
"gatsby-plugin-minify-html": "^1.0.4",
"gatsby-plugin-offline-next": "^5.2.3",
"gatsby-plugin-sass": "^5.20.0",
"gatsby-plugin-sharp": "^4.20.0",
Expand Down
2 changes: 0 additions & 2 deletions src/components/Layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import Header from '../Header';
import Footer from '../Footer';
import SEO from '../Seo';

import '../../styles/index.scss';

interface Props {
children: React.ReactNode;
title?: string;
Expand Down

0 comments on commit fd57b87

Please sign in to comment.