Skip to content

Commit

Permalink
Merge pull request #644 from tubone24/gitalk
Browse files Browse the repository at this point in the history
add /* webpackPrefetch: true */
  • Loading branch information
tubone24 authored Nov 7, 2021
2 parents 614eb82 + 73187ac commit 13a2e8a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/components/Gitalk/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {Component} from 'react'
import 'gitalk/dist/gitalk.css';
const isBrowser = typeof window !== 'undefined';
const Gitalk = isBrowser ? require('gitalk') : undefined;

Expand Down
4 changes: 1 addition & 3 deletions src/templates/blog-post.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import React, { Component } from 'react';
import loadable from '@loadable/component'
import { graphql } from 'gatsby';

import 'gitalk/dist/gitalk.css';

import { parseDate } from '../api';

import Sidebar from '../components/Sidebar';
Expand All @@ -17,7 +15,7 @@ import Header from '../components/Header';
// import TableOfContent from '../components/TableOfContent';
import ShareBox from '../components/ShareBox';
import TimeToRead from '../components/TimeToRead';
const Gitalk = loadable(() => import('../components/Gitalk'));
const Gitalk = loadable(() => import(/* webpackPrefetch: true */ '../components/Gitalk'));

// Styles
import './blog-post.scss';
Expand Down

0 comments on commit 13a2e8a

Please sign in to comment.