mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
28 lines
845 B
TypeScript
28 lines
845 B
TypeScript
/**
|
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
*/
|
|
|
|
import * as Mobx from "mobx";
|
|
import * as Immer from "immer";
|
|
|
|
/**
|
|
* Setup default configuration for external npm-packages
|
|
*/
|
|
export default function configurePackages() {
|
|
// Docs: https://mobx.js.org/configuration.html
|
|
Mobx.configure({
|
|
enforceActions: "never",
|
|
|
|
// TODO: enable later (read more: https://mobx.js.org/migrating-from-4-or-5.html)
|
|
// computedRequiresReaction: true,
|
|
// reactionRequiresObservable: true,
|
|
// observableRequiresReaction: true,
|
|
});
|
|
|
|
// Docs: https://immerjs.github.io/immer/
|
|
// Required in `utils/storage-helper.ts`
|
|
Immer.setAutoFreeze(false); // allow to merge mobx observables
|
|
Immer.enableMapSet(); // allow to merge maps and sets
|
|
}
|