# 弃用主题和插件中的 .js.es6 文件扩展名

**URL:** https://meta.discourse.org/t/deprecating-js-es6-file-extensions-in-themes-and-plugins/398894
**Category:** Development
**Tags:** dev-news
**Created:** [2026年三月20日 16:03 UTC](https://meta.discourse.org/t/deprecating-js-es6-file-extensions-in-themes-and-plugins/398894 "2026-03-20T16:03:38Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [2026年三月20日 16:03 UTC](https://meta.discourse.org/t/deprecating-js-es6-file-extensions-in-themes-and-plugins/398894/1 "2026-03-20T16:03:38Z")

</div>

早在 2020 年，Discourse 就将扩展名从 `.js.es6` 切换到了 `.js`。多年来，绝大多数主题和插件都已切换到使用新的扩展名，这为现代 JavaScript 工具链提供了更好的兼容性。

我们现在 [正式弃用](https://github.com/discourse/discourse/pull/38756) `.js.es6` 的使用，并在下一次 ESR 发布后移除对其的支持。

如果看到有关 `.js.es6` 文件的弃用消息，您只需将其重命名为 `.js` 即可。就是这样。无需更改文件内容。

---

_[View the full topic](https://meta.discourse.org/t/deprecating-js-es6-file-extensions-in-themes-and-plugins/398894)._
