Google Closure 编译器最大字节数

发布于 2024-12-12 22:35:59 字数 355 浏览 3 评论 0原文

我在 Minify_JS_ClosureCompiler->min() 方法中注意到这种情况:

if ($bytes > 200000) {
    throw new Minify_JS_ClosureCompiler_Exception(
        'POST content larger than 200000 bytes'
    );
}

我的项目远远超过了 200k 的 JavaScript。有谁知道为什么会出现这个异常?

它被硬编码为条件值,而不是我可以在 config.php 中编辑的变量,因此我认为它具有一些潜在的重要性,但我找不到合理的答案。

I noticed in the Minify_JS_ClosureCompiler->min() method this condition:

if ($bytes > 200000) {
    throw new Minify_JS_ClosureCompiler_Exception(
        'POST content larger than 200000 bytes'
    );
}

My project is well in excess of 200k of JavaScript. Does anybody know why this exception is here?

It's hard-coded as a conditional value and not a variable which I can edit in the config.php so I assume it has some underlying importance, but I can't find a reasonable answer.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

总以为 2024-12-19 22:35:59

来自常见问题解答:

可编译的文件大小有限制吗?
编译 Web 服务有最大文件大小,但独立编译器应用程序没有。

我猜想,但确实不知道,该限制是针对 Google 提供的网络服务的。也就是说,如果您要建立自己的网络服务,您可以根据需要摆脱该限制。

From the FAQ:

Are there any restrictions on the size of the files that can be compiled?
The compilation web service has a maximum file size, but the standalone compiler application does not.

I guess, but really don't know, that the limit is intended for the web service that Google provides. That is, if you were to set up your own web service, you could get rid of that limitation if you wanted.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文