# ИСПРАВЛЕНИЕ: Компиляция отсутствующих бандлов плагина rollup по требованию в режиме разработки

**URL:** https://meta.discourse.org/t/fix-compile-missing-rollup-plugin-bundles-on-demand-in-development/398864
**Category:** Bug
**Created:** [20.Март.2026 07:06:50 UTC](https://meta.discourse.org/t/fix-compile-missing-rollup-plugin-bundles-on-demand-in-development/398864 "2026-03-20T07:06:50Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![small-lovely-cat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/small-lovely-cat/32/553546_2.png) [@small-lovely-cat](https://meta.discourse.org/u/small-lovely-cat)
#### Post date: [20.Март.2026 07:06:50 UTC](https://meta.discourse.org/t/fix-compile-missing-rollup-plugin-bundles-on-demand-in-development/398864/1 "2026-03-20T07:06:50Z")

</div>

В #38658 компилятор плагина rollup включён по умолчанию, однако плагин может исчезнуть, если его запись в сгенерированном манифесте отсутствует или устарела, например, плагин `Chat`.

Этот коммит добавляет логику, использующую существующий путь поиска в манифесте для компиляции бандла плагина по требованию в режиме разработки, после чего выполняется повторный поиск. Это предотвращает тихий сбой загрузки плагинов, таких как чат, в локальной разработке после перехода на rollup.

Также добавлен падающий тест для защиты от регрессии.

* * *

До:

Даже если плагин включён, в контейнере разработки ничего не происходило.

 ![image](https://global.discourse-cdn.com/meta/original/4X/0/e/3/0e367f01a5d625a8c7ef1a3809fb41824a426ac2.png)

После:

 ![image](https://global.discourse-cdn.com/meta/original/4X/2/9/c/29cf1ac794b8b65c7b29bdd7b2723c0a2f82c595.png)

 ![image](https://global.discourse-cdn.com/meta/original/4X/7/3/7/737633bcc67798d47d11297473d1c0b5e12d1e58.png)

> <https://github.com/discourse/discourse/pull/38746>
>
> In #38658 , rollup plugin compiler is enabled by default, however, a plugin can …disappear if its generated manifest entry is missing or stale, e.g. \`Chat\` plugin.
> 
> This commit adds the logic using the existing manifest lookup path to compile the plugin bundle on demand in development, then retry the lookup, preventing plugins like chat from silently failing to load in local dev after the rollup switch.
> 
> Also, a failing spec is added to guard against regression.
> 
> \---
> 
> Before:
> 
> Even if the plugin is enabled, nothing happened in dev container.
> (See the upper right side of the page)
> 
> \<img width="1919" height="971" alt="image" src="https://github.com/user-attachments/assets/3ee04cdd-2f16-4c4f-8df3-f4098d47abd6" /\>
> 
> After:
> 
> \<img width="1919" height="923" alt="image" src="https://github.com/user-attachments/assets/78fa78e7-f553-4900-90da-f6ad1ee00038" /\>
> 
> \<img width="878" height="182" alt="image" src="https://github.com/user-attachments/assets/c4534290-5c2f-436d-886e-55c811386e24" /\>

---

_[View the full topic](https://meta.discourse.org/t/fix-compile-missing-rollup-plugin-bundles-on-demand-in-development/398864)._
