# Ionic4 React - how to avoid code splitting, or preload modules

**URL:** <https://forum.ionicframework.com/t/ionic4-react-how-to-avoid-code-splitting-or-preload-modules/180857>\
**Category:** Ionic React\
**Created:** [January 4, 2020, 6:24am UTC](https://forum.ionicframework.com/t/ionic4-react-how-to-avoid-code-splitting-or-preload-modules/180857 "2020-01-04T06:24:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcopeg](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/marcopeg/32/130061_2.png) [@marcopeg](https://forum.ionicframework.com/u/marcopeg)\
**Post date:** [January 4, 2020, 6:24am UTC](https://forum.ionicframework.com/t/ionic4-react-how-to-avoid-code-splitting-or-preload-modules/180857/1 "2020-01-04T06:24:15Z")

</div>

Hello, I’m happily working on a Ionic4/CRA app but I face quite a lag the first time I use a Modal or PopOver due to built-in lazy loading.

I’m struggling to find a viable way out of this. For the best user experience, I need either of the following solutions:

A) produce one single bundle and work on a CSS based loading screen  
B) being able to preload Ionic components in the main file

But I can’t find any documentation.  
Can you help out?

---

<div class="post-metadata">

**Author:** ![victorcarvalhosp](https://avatars.discourse-cdn.com/v4/letter/v/b782af/32.png) [@victorcarvalhosp](https://forum.ionicframework.com/u/victorcarvalhosp)\
**Post date:** [April 27, 2020, 8:58pm UTC](https://forum.ionicframework.com/t/ionic4-react-how-to-avoid-code-splitting-or-preload-modules/180857/2 "2020-04-27T20:58:25Z")

</div>

> [@marcopeg](#):
>
> uce one single bundle and work on a CSS based loading screen  
> B) being able to preload Ionic components in the main file

Same issue here! Someone from ionic team can give some thoughts about this please?
