razzle README

The project's README from github.com/jaredpalmer/razzle. As one markdown file: README.md.

repo-banner

npm version npm Node CI Known Vulnerabilities Razzle-status license Discord

Universal JavaScript applications are tough to setup. Either you buy into a framework like Next.js or Nuxt, fork a boilerplate, or set things up yourself. Aiming to fill this void, Razzle is a tool that abstracts all the complex configuration needed for building SPA's and SSR applications into a single dependency--giving you the awesome developer experience of create-react-app, but then leaving the rest of your app's architectural decisions about frameworks, routing, and data fetching up to you. With this approach, Razzle not only works with React, but also Preact, Vue, Svelte, and Angular, and most importantly......whatever comes next.

Getting Started

Visit https://razzlejs.org/getting-started to get started with Razzle.

Examples

Razzle has many examples, we might have one that fits your needs

See: The examples

Documentation

Visit https://razzlejs.org/ to view the documentation.

Getting help

If you get stuck, check out Razzle's GitHub Discussions. In addition, #razzle-afterjs on the Formium Community Discord Server is a great way to get help quickly too.

Contributing

Please see our CONTRIBUTING.md.

Inspiration

Author

Contributors

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!


MIT License

razzle (jaredpalmer/razzle)

Searching Database…

11K ·GitHub
这是什么?Razzle 是一个工具,它把构建 SPA(单页应用)和服务端渲染(SSR)通用 JavaScript 应用所需的全部复杂配置打包成一个依赖。你可以获得类似 create-react-app 的开发体验,而框架、路由和数据获取等技术选型仍然由你自己决定。
Razzle 是像 Next.js 那样的框架,还是别的什么东西?它不是一个大而全的框架。与 Next.js 或 Nuxt 不同,Razzle 只负责构建和配置这一层,你在框架、路由和数据获取方案上的选择完全不受影响。
新建一个 Razzle 应用要怎么设置?把 Razzle 作为单一依赖添加到项目中,然后按照 razzle.dev.orgs 上的入门指南操作即可。这个代码仓库还附带了许多现成的示例,很可能已经有一个正好匹配你的技术栈。
我必须搭配 React 使用吗,还是也能用其他库?不必须。Razzle 开箱即支持 React,但同样支持 Preact、Vue、Svelte、Angular 以及以后出现的任何框架——路由和数据获取库也由你自己挑选。
如果 create-react-app 已经能满足 SPA 开发,那谁还需要 Razzle?那些想要服务端渲染或通用 JavaScript 应用、又不想手动维护打包器配置的开发者,同时他们也不愿意被 Next.js 或 Nuxt 这类强主见框架绑住手脚。
它能在我的 Windows 电脑上运行吗?Razzle 是一个 Node.js 命令行构建工具,所以可以在 macOS、Windows 和 Linux 上运行,它构建出来的应用也是标准的 JavaScript 网页应用。
作者为什么要做这个,而不是直接用 Next.js 或现成的脚手架?因为以前搭建通用 JavaScript 应用非常痛苦:要么选择像 Next.js 或 Nuxt 这样的强主见框架,要么去 fork 一个脚手架,要么自己从头配置所有东西。Razzle 填补了这个空白,它提供 CRA 式的简单体验,却没有任何架构上的束缚。
有没有现成的示例可以直接上手?有——代码仓库里包含许多覆盖不同配置的示例,README 里也提到其中很可能有一个正好符合你的需求,这样你就可以从能运行的代码开始,而不是面对一片空白的配置。
Size
13.6 MB
Stars
11K
Age
10y
Commits · 90 Days