I have a frontend module that binds the FileNavigatorContribution
and OutlineViewContribution
to constant values as shown below
import { ContainerModule } from "inversify";
import { OutlineViewContribution } from "@theia/outline-view/lib/browser/outline-view-contribution";
import { FileNavigatorContribution } from "@theia/navigator/lib/browser/navigator-contribution";
import { FrontendApplicationContribution } from "@theia/core/lib/browser";
import { RemoveUnusedFrontendContribution } from "./core-contribution";
export default new ContainerModule((bind, _unbind, _isBound, rebind) => {
rebind(FileNavigatorContribution).toConstantValue({
// eslint-disable-next-line @typescript-eslint/no-empty-function
registerCommands: () => {},
// eslint-disable-next-line @typescript-eslint/no-empty-function
registerMenus: () => {},
// eslint-disable-next-line @typescript-eslint/no-empty-function
registerKeybindings: () => {},
// eslint-disable-next-line @typescript-eslint/no-empty-function
registerToolbarItems: () => {},
} as any);
rebind(OutlineViewContribution).toConstantValue({
// eslint-disable-next-line @typescript-eslint/no-empty-function
registerCommands: () => {},
// eslint-disable-next-line @typescript-eslint/no-empty-function
registerMenus: () => {},
// eslint-disable-next-line @typescript-eslint/no-empty-function
registerKeybindings: () => {},
// eslint-disable-next-line @typescript-eslint/no-empty-function
registerToolbarItems: () => {},
} as any);
bind(FrontendApplicationContribution).to(RemoveUnusedFrontendContribution);
});
Reason for binding this to a constant value - I don’t want those contributions to be part of my application.
I followed @vince-fugnitto’s suggestion from here - Minimal setup - code editor only (no navigator and other features)
After upgrading to 1.16.0, when I run the browser version, I get the below error
Did something change in 1.16.0 that would require me to remove contributions in a different way?