Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce first load JS on blog posts by 53% #15

Merged
merged 4 commits into from May 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions components/Code.tsx
@@ -1,6 +1,9 @@
import React from 'react';
import { darcula } from 'react-syntax-highlighter/dist/cjs/styles/prism';
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
import darcula from 'react-syntax-highlighter/dist/cjs/styles/prism/darcula';
import { PrismLight, PrismAsyncLight } from "react-syntax-highlighter"

const SyntaxHighlighter =
typeof window === "undefined" ? PrismLight : PrismAsyncLight

export default class Code extends React.PureComponent<{
language: string;
Expand Down
2 changes: 1 addition & 1 deletion md/blog/the-ultimate-tech-stack.md
Expand Up @@ -174,7 +174,7 @@ Head to the GitHub repo to get started: [https://github.com/colinhacks/devii](ht

To jump straight into the code, clone the repo and start the development server like so:

```sh
```bash
git clone git@github.com:colinhacks/devii.git mysite
cd mysite
yarn
Expand Down