Questions tagged [loadable-component]
53 questions
12
votes
1 answer
ChunkLoadError: Loading chunk XY failed. - Randomly getting fatal on PRODUCTION
we have got our ecommerce platform already in production and we are experiencing weird ChunkLoadError. This error happens randomly, and is not replicable. When we are trying to open failed file it is there and can be loaded normaly.
If user get's…

Ivan Kopčík
- 121
- 1
- 1
- 4
9
votes
3 answers
Getting error "Path" argument must be string while deploying React - Loadable components sample code in cloud functions
I'm trying to integrate Loadable components in my SSR project and that is working when I executed in localhost:3000, then I tried to deploy it in cloud function I am getting this error
[ERR_INVALID_ARG_TYPE]: The "path" argument must be of type…

Curvegraph
- 850
- 1
- 10
- 17
7
votes
1 answer
React: Loadable Components increase Cumulative Layout Shift (CLS)
After migrating a server side rendering React application to Loadable Components for code splitting and lazy loading, the initial bundle size, thus its download time, reduced as expected.
However after replacing the classical React rendering method…

Ludovic
- 223
- 3
- 9
5
votes
0 answers
React SSR blinks when starting client
simplifying my post:
my ssr webpage blinks when starting client which means page renders server side rendered html then goes blank and then it starts loading everything all over again.
going through the details:
i'm working on a react project…

zahra shahrouzi
- 862
- 7
- 18
4
votes
0 answers
Why are my prefetched scripts not being used? (webpack)
I'm trying to prefetch scripts so that I can render (prefetched) React components the user will navigate to faster. My scripts are being prefetched but they don't seem to be used. When I go to another page (e.g. Look), the Look bundle is fetched…

Alexander
- 396
- 1
- 9
- 19
4
votes
2 answers
Did not expect server HTML to contain a in
I'm working in a project that uses:
react/react-dom@16.9.0
@loadable/component
styled-components
react-router-dom
The application renders both server side and client side.
I'm using @loadable/component to dynamically code split this…
Alejandro Garcia Anglada
- 2,373
- 1
- 25
- 41
I'm working in a project that uses:
react/react-dom@16.9.0
@loadable/component
styled-components
react-router-dom
The application renders both server side and client side.
I'm using @loadable/component to dynamically code split this…

Alejandro Garcia Anglada
- 2,373
- 1
- 25
- 41
3
votes
1 answer
Failed to asynchronously load component with loadable components using Webpack and React
The error
I get the following error when (what appears to be) vendor scripts that try downloading:
index.js:1 loadable-components: failed to asynchronously load component
{fileName: undefined, chunkName: undefined, error: 'Loading chunk 1117…

Clarice Bouwer
- 3,631
- 3
- 32
- 55
3
votes
1 answer
loadable-components: failed to asynchronously load component
I have created module A which is a component library for my React App. Which I plan on using on module B which is my actual React App.
I have an index.js whereby I export my components from module A by using loadable components in the following…

Ayabonga Qwabi
- 306
- 5
- 12
3
votes
0 answers
how to implement react serverside rendering with codesplitting using rollup?
I recently implemented serverside-rendering react app with code splitting using loadable-components
But it seems that loadable-components itself dependent on webpack, since loadable replaces jsonp_callback with its own reporter.
So what are the…

jwkoo
- 2,393
- 5
- 22
- 35
3
votes
0 answers
Invariant Violation: loadable: SSR requires `@loadable/babel-plugin`, please install it loadable component
I'm using the loadable component in a ReactJS project. For SSR but I get the following error when I run start command, I saw an issue in the GitHub related to my issue but the main solution doesn't work for me.
This is my routes file that I added…

tmohammad78
- 177
- 2
- 17
3
votes
0 answers
There was an error: Invariant Violation: loadable: cannot find pages-Home in stats. (@loadable/component)
I've used this article to configure code splitting on server site https://loadable-components.com/docs/server-side-rendering/ .
const statsFile = path.resolve('../dist/public/loadable-stats.json')
const extractor = new ChunkExtractor({…

Andrey Radkevich
- 3,012
- 5
- 25
- 57
3
votes
0 answers
How to remove unused javascript in GatsbyJS?
So, react-lazy & suspense does not work in gatsby as React.lazy and Suspense is not yet available for server-side rendering. But, we can use Loadable Components(https://loadable-components.com/docs/getting-started/) for that instead. So, I have used…

user8084720
- 193
- 1
- 4
- 15
2
votes
1 answer
How to Lazy-Load a React Native module from a path stored in a variable
I've been trying to load a React Native component dynamically, but to no success. It seems like React Native doesn't like it at all when you try passing it a module path stored in a variable :
This works very well - React.lazy :
const OtherComponent…

Program-Me-Rev
- 6,184
- 18
- 58
- 142
2
votes
0 answers
How do you configure SSR with Loadable Components on NextJS?
We have a requirement to use Loadable Components in a new NextJS app we are building. I believe in NextJS for this use case you tend to use their native dynamic import feature but we are pulling in code from our mature codebase with extensive use of…

andrew_scfc
- 645
- 3
- 16
2
votes
1 answer
serverside-rendering react app with code splitting using loadable-components
I recently implemented serverside-rendering react app with code splitting using loadable-components
But it seems that loadable-components itself dependent on webpack, since loadable replaces jsonp_callback with its own reporter.
So what are the…

jwkoo
- 2,393
- 5
- 22
- 35