preact-netlify

时间:2021-05-31 14:21:41
【文件属性】:
文件名称:preact-netlify
文件大小:5.93MB
文件格式:ZIP
更新时间:2021-05-31 14:21:41
JavaScript 博客 CLI命令 # install dependencies yarn # serve with hot reload at localhost:8080 yarn dev # build for production with minification yarn build # run tests with jest and preact-render-spy yarn test 有关工作原理的详细说明,请查看。 注意:在预渲染时,您的模块作为组件在 Node.js 环境中执行,其中大多数 Web API 不可用。 为了解决这个问题,将该代码包装在一个检查中,例如if (typeof window !== 'undefined') 。 不要将preact build --no-prerender添加到 build 命令,因为它会阻止渲染博客文章。
【文件预览】:
preact-netlify-master
----.babelrc(122B)
----content()
--------images()
--------blog()
----.netlify()
--------state.json(53B)
----prerender-urls.js(976B)
----package.json(2KB)
----preact.config.js(486B)
----tests()
--------__mocks__()
--------header.test.js(436B)
----src()
--------style()
--------index.js(75B)
--------crawler()
--------template.html(1KB)
--------assets()
--------routes()
--------manifest.json(439B)
--------static()
--------components()
----netlify.toml(136B)
----.gitignore(45B)
----README.md(693B)
----yarn.lock(527KB)

网友评论