# 在 Discourse 中，所有 js 和 css 文件都是单独呈现的。为什么不将它们合并成一两个文件来提供呢？

**URL:** <https://meta.discourse.org/t/in-discourse-all-js-and-css-files-are-presented-separately-why-dont-we-combine-them-into-one-or-two-files-and-present-them/306793>\
**Category:** Development\
**Tags:** css\
**Created:** [2024 年5 月 5 日 12:16 UTC](https://meta.discourse.org/t/in-discourse-all-js-and-css-files-are-presented-separately-why-dont-we-combine-them-into-one-or-two-files-and-present-them/306793 "2024-05-05T12:16:44Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

作者： ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
发布日期： [2024 年5 月 6 日 07:52 UTC](https://meta.discourse.org/t/in-discourse-all-js-and-css-files-are-presented-separately-why-dont-we-combine-them-into-one-or-two-files-and-present-them/306793/8 "2024-05-06T07:52:23Z")

</div>

> [@kuaza](#):
>
> 例如，如果只有1或2个CSS文件而不是30个CSS文件，是否可以进一步加快进程？

这里需要证据，打包（bundling）对HTTP 1.1网站有很大好处，但对2.0网站则不然。

> **[HTTP/2 technology demo](http://www.http2demo.io/)**

我当然希望东西能更快，但当JavaScript中的`eval`是瓶颈时，调整打包就不是正确的方法。

---

_[View the full topic](https://meta.discourse.org/t/in-discourse-all-js-and-css-files-are-presented-separately-why-dont-we-combine-them-into-one-or-two-files-and-present-them/306793)._
