所以我升级并收到此消息:
Gatsby is currently using the default template for HTML. You can override
this functionality by creating a React component at "/html.js"
You can see what this default template does by visiting:
https://github.com/gatsbyjs/gatsby/blob/master/lib/isomorphic/html.js
我已经很困惑了,因为我的根目录中有一个html.jsx
并且以前版本的 gatsby 可以正常使用它。 也许我现在需要用新版本把它放在其他地方?
所以我结束尝试/wrappers
和/pages
,两者都不起作用
然后我尝试将扩展名更改为.js
因为我使用.jsx
,这也不起作用
除了这 1 个问题,升级到 0.10 是轻松的,但我需要html.jsx
代码,我不清楚为什么这种行为会改变?
这些是我尝试过的展示位置:
/html.js
/wrappers/html.js
/pages/html.js
有什么明显的我遗漏了吗?
嘿@rossPatton ,PR #275 应该可以解决这个问题,请降级到0.10.0
并重试
哈! 就是这样。 感谢您及时的回复
@rossPatton我刚刚发布了 0.10.2,并在 #275 中进行了修复。 如果您可以升级并告诉我该修复程序是否适合您,我们将不胜感激。
最有用的评论
嘿@rossPatton ,PR #275 应该可以解决这个问题,请降级到
0.10.0
并重试