gatsby - Gatsby JSS 在页面加载时出现“闪烁”
问题描述
我的 Gatbsy 网站的页面加载时出现了无样式内容的“闪烁”。在此处查看当前部署预览可能最有帮助https://happy-mahavira-5cd669.netlify.com/。
到目前为止,我的研究将 gatsby-config.js 文件作为问题的根源。这是该文件当前的样子:
module.exports = {
siteMetadata: {
title: 'Dillon Morris - UI Designer & Developer',
author: 'Dillon Morris',
siteUrl: 'www.dillonmorris.me',
description: 'Dillon is a UI/UX Developer & Designer in Phoenix, AZ',
},
plugins: [
gatsby-plugin-react-helmet
,
{
resolve: gatsby-plugin-jss
,
options: {},
},
{
resolve: gatsby-source-filesystem
,
options: {
name: src
,
path: ${__dirname}/src/
,
},
},
{
resolve: gatsby-transformer-remark
,
options: {
plugins: [gatsby-remark-prismjs
],
},
},
{
resolve: gatsby-plugin-manifest
,
options: {
name: 'Dillon Morris UI/UX Designer & Developer',
short_name: 'Dillon',
start_url: '/',
background_color: '#663399',
theme_color: '#663399',
display: 'minimal-ui',
icon: 'src/images/logo.png', // This path is relative to the root of the site.
},
},
gatsby-plugin-offline
,
'gatsby-plugin-netlify',
],
}
我也尝试gatsby-plugin-jss
在 plugins 数组中明确列出(就像gatsyby-plugin-react-helmet
),而不是具有 resolve 和 options 属性的对象,但没有运气。
这就是我自己能够进行的故障排除的程度,我不知道有其他方法可以诊断或解决这个问题。这个问题在开发模式下不会在本地发生,只会在构建并部署到 Netlify 后发生。
如果您愿意,请随意拉下代码并四处寻找。 https://github.com/dillonmorris91/portfoliodm。
感谢 Stack Overflow 社区❤️
解决方案
推荐阅读
- powerpoint - 如何将颜色应用于PowerPoint插件中的选定文本?
- c# - 删除所有不匹配的内容
- c# - 从 MainWindow.xaml.cs 调用 ShowWindowCommand()
- angular - angular:6 typescript:2 primeng:7 导致“环境上下文中不允许使用 cli 初始化程序”
- css - 顺风:文本溢出:省略号?
- postgresql - TimescalDB 比纯 PostgreSQL 慢
- azure - Azure 人脸 API 定价?
- apache-drill - 使用REGEXP_REPLACE sql方法在apache钻中替换多个字符串
- angular - Angular:等待一个可观察对象的返回以启动另一个
- c++ - 二进制“==”:未找到运算符 - TCP 套接字 SFML