Improve lazy loading (#12393)
Creating manual chunk was a bad idea, we should always solve lazy loading problem at the source instance. Setting a 4.5MB for the index bundle size, CI will fail if we go above. There is still a lot of room for optimizations! - More agressive lazy loading (e.g. xyflow and tiptap are still loaded in index!) - Add a prefetch mechanism - Add stronger CI checks to make sure libraries we've set asides are not added back - Fix AllIcons component with does not work as intended (loaded on initial load)
This commit is contained in:
+8
-1
@@ -1,6 +1,7 @@
|
||||
import { renderHook } from '@testing-library/react';
|
||||
import { RecoilRoot } from 'recoil';
|
||||
|
||||
import { JestObjectMetadataItemSetter } from '~/testing/jest/JestObjectMetadataItemSetter';
|
||||
import { useObjectNamePluralFromSingular } from '../useObjectNamePluralFromSingular';
|
||||
|
||||
describe('useObjectNamePluralFromSingular', () => {
|
||||
@@ -8,7 +9,13 @@ describe('useObjectNamePluralFromSingular', () => {
|
||||
const { result } = renderHook(
|
||||
() => useObjectNamePluralFromSingular({ objectNameSingular: 'person' }),
|
||||
{
|
||||
wrapper: RecoilRoot,
|
||||
wrapper: ({ children }) => (
|
||||
<RecoilRoot>
|
||||
<JestObjectMetadataItemSetter>
|
||||
{children}
|
||||
</JestObjectMetadataItemSetter>
|
||||
</RecoilRoot>
|
||||
),
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
+8
-1
@@ -1,6 +1,7 @@
|
||||
import { renderHook } from '@testing-library/react';
|
||||
import { RecoilRoot } from 'recoil';
|
||||
|
||||
import { JestObjectMetadataItemSetter } from '~/testing/jest/JestObjectMetadataItemSetter';
|
||||
import { useObjectNameSingularFromPlural } from '../useObjectNameSingularFromPlural';
|
||||
|
||||
describe('useObjectNameSingularFromPlural', () => {
|
||||
@@ -8,7 +9,13 @@ describe('useObjectNameSingularFromPlural', () => {
|
||||
const { result } = renderHook(
|
||||
() => useObjectNameSingularFromPlural({ objectNamePlural: 'people' }),
|
||||
{
|
||||
wrapper: RecoilRoot,
|
||||
wrapper: ({ children }) => (
|
||||
<RecoilRoot>
|
||||
<JestObjectMetadataItemSetter>
|
||||
{children}
|
||||
</JestObjectMetadataItemSetter>
|
||||
</RecoilRoot>
|
||||
),
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user