안녕하세요!
플러그인 API를 사용하여 컨트롤러를 수정하려고 했는데 다음과 같은 경고와 함께 실패했습니다:
[THEME xxx] "controller:full-page-search"는 이미 컨테이너에 캐시되었습니다. 변경 사항이 적용되지 않습니다.
제 코드:
function modifySearchTypes(api) {
api.modifyClass("controller:full-page-search", {
pluginId: "modify-search-types",
init() {
this._super(...arguments);
this.set("searchTypes", [
{ name: I18n.t("search.type.default"), id: SEARCH_TYPE_DEFAULT },
{
name: this.siteSettings.tagging_enabled
? I18n.t("search.type.categories_and_tags")
: I18n.t("search.type.categories"),
id: SEARCH_TYPE_CATS_TAGS,
},
]);
this.selected = [];
},
});
}
export default {
name: "modify-search-types",
initialize() {
withPluginApi("0.10.0", modifySearchTypes);
},
};
이를 어떻게 처리해야 할까요?
감사합니다!