1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/packages/technical-features/react-application/src/feature.ts
Janne Savolainen 13f1d6f7f3
chore: Adapt to injectable feature-wrappers
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2023-04-17 11:47:11 +03:00

19 lines
651 B
TypeScript

import { getFeature } from "@k8slens/feature-core";
import { autoRegister } from "@ogre-tools/injectable-extension-for-auto-registration";
import { applicationFeature } from "@k8slens/application";
import { injectableMobXFeature, injectableReactFeature } from "@k8slens/basic-dependency-features";
export const reactApplicationFeature = getFeature({
id: "react-application",
register: (di) => {
autoRegister({
di,
targetModule: module,
getRequireContexts: () => [require.context("./", true, /\.injectable\.(ts|tsx)$/)],
});
},
dependencies: [injectableReactFeature, injectableMobXFeature, applicationFeature],
});