I am using entities and instead of having empty entities at the start I want to add a default item in the initial state. I tried something like below:
const id = uuidv4()
const zeroState = adapter.getInitialState({
activeTabId: id,
});
const homeTab = {
pageID: id,
pageTitle: 'Home',
} as PageInfo;
export const initialState = adapter.addOne(homeTab, zeroState);
It works fine in dev environment and ng build --prod=true
also builds fine. But when I deploy the application doesn't run/load anything and instead throws Uncaught Error: Cannot enable prod mode after platform setup..
Can someone tell me on how to add an item to initial entity state ?