Merge pull request #559 from SwwweetOrange/feat-dynamic-waline

dynamic import waline/client
This commit is contained in:
tangly1024
2022-12-10 16:00:41 +08:00
committed by GitHub
6 changed files with 9 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
import React from 'react' import React from 'react'
import { RecentComments } from '@waline/client'
import BLOG from '@/blog.config' import BLOG from '@/blog.config'
import Link from 'next/link' import Link from 'next/link'
import { RecentComments } from '@waline/client'
/** /**
* @see https://waline.js.org/guide/get-started.html * @see https://waline.js.org/guide/get-started.html

View File

@@ -2,7 +2,8 @@ import BLOG from '@/blog.config'
import Live2D from '@/components/Live2D' import Live2D from '@/components/Live2D'
import { useGlobal } from '@/lib/global' import { useGlobal } from '@/lib/global'
import Link from 'next/link' import Link from 'next/link'
import ExampleRecentComments from './ExampleRecentComments' import dynamic from 'next/dynamic'
const ExampleRecentComments = dynamic(() => import('./ExampleRecentComments'))
export const SideBar = (props) => { export const SideBar = (props) => {
const { locale } = useGlobal() const { locale } = useGlobal()

View File

@@ -1,9 +1,9 @@
import React from 'react' import React from 'react'
import { RecentComments } from '@waline/client'
import BLOG from '@/blog.config' import BLOG from '@/blog.config'
import Card from '@/themes/hexo/components/Card' import Card from '@/themes/hexo/components/Card'
import { useGlobal } from '@/lib/global' import { useGlobal } from '@/lib/global'
import Link from 'next/link' import Link from 'next/link'
import { RecentComments } from '@waline/client'
/** /**
* @see https://waline.js.org/guide/get-started.html * @see https://waline.js.org/guide/get-started.html

View File

@@ -6,9 +6,10 @@ import Catalog from './Catalog'
import { InfoCard } from './InfoCard' import { InfoCard } from './InfoCard'
import { AnalyticsCard } from './AnalyticsCard' import { AnalyticsCard } from './AnalyticsCard'
import CONFIG_HEXO from '../config_hexo' import CONFIG_HEXO from '../config_hexo'
import HexoRecentComments from './HexoRecentComments'
import BLOG from '@/blog.config' import BLOG from '@/blog.config'
import dynamic from 'next/dynamic'
const HexoRecentComments = dynamic(() => import('./HexoRecentComments'))
/** /**
* Hexo主题右侧栏 * Hexo主题右侧栏
* @param {*} props * @param {*} props

View File

@@ -1,7 +1,7 @@
import React from 'react' import React from 'react'
import { RecentComments } from '@waline/client'
import BLOG from '@/blog.config' import BLOG from '@/blog.config'
import Link from 'next/link' import Link from 'next/link'
import { RecentComments } from '@waline/client'
/** /**
* @see https://waline.js.org/guide/get-started.html * @see https://waline.js.org/guide/get-started.html

View File

@@ -6,8 +6,9 @@ import CategoryGroup from './CategoryGroup'
import TagGroups from './TagGroups' import TagGroups from './TagGroups'
import CONFIG_NEXT from '../config_next' import CONFIG_NEXT from '../config_next'
import { useRouter } from 'next/router' import { useRouter } from 'next/router'
import NextRecentComments from './NextRecentComments'
import BLOG from '@/blog.config' import BLOG from '@/blog.config'
import dynamic from 'next/dynamic'
const NextRecentComments = dynamic(() => import('./NextRecentComments'))
/** /**
* 侧边平铺 * 侧边平铺