Questions tagged [loadable-component]
53 questions
2
votes
1 answer
When to use loadable-components in NextJS app?
I'm trying to improve my site performance and the Google Chrome Lighthouse tells me to use loadable-components for ssr in order to "remove unused javascript".
What I found in the doc is it seems to be a library with useful functions for my case, eg:…

agentp
- 335
- 4
- 17
2
votes
0 answers
404 errors for the chunks files generated from @loadable/component
My app is based on Reactjs SSR. I have few dynamic loadable components. I am using @loadable/component to achieve the same. I am using 'chunkExtractor.getScriptElements()' at the server side to load the files. Below is the build directory…

SanPanthera
- 39
- 3
2
votes
1 answer
Deploying on Now razzle with loadable-components
I am trying to deploy on Now the loadable-components example with Razzle.
I added the following now.json at the root of my project:
{
"version": 2,
"builds": [
{
"src": "build/server.js",
"use": "@now/node"
},
{
…

Johan Rin
- 1,900
- 2
- 20
- 42
1
vote
0 answers
The problem of nested routes not loading in React Router version 6
When I send a quoteId and try to open a comment for it, the Comments component does not load.
I tried to do this using a loadable component, but it still didn't work
I don't have any errors in my console, there are only a few warnings as…

Mahdi Narimani
- 13
- 5
1
vote
0 answers
dinamic import type in react typescript whit loadable component
good evening I have developed a solution to simplify the use of multiple components in react thanks to loadable component it works perfect but in terms of typing I can't do the dynamic import
import loadable, { LoadableComponent } from…

Nelson Javier Avila
- 368
- 3
- 8
1
vote
0 answers
Loadable Components + SSR + Webpack 5 - duplicate main.js
I refactor an old application made by 'create-react-app'. I wanted to add the loadable components library and everything worked until I added extractor.getScriptTags() to index.html.
Adding the extractor resulted in the duplicate of the generated…

sureduck
- 11
- 2
1
vote
0 answers
how to use namespace in @loadable/server
The @loadable/server docs - https://loadable-components.com/docs/api-loadable-server/
give an option for using namespace in chunkExtractor as an option if you have several React apps on the same page. Can someone give me an example implementation…

Shubham Luthra
- 11
- 1
1
vote
0 answers
How to call the public directory from functions directory in Google cloud functions
I'm using Loadable components in my react Server side rendering site. It works well in localhost, then I tried to run the site in google cloud function I am getting The "path" argument must be of type string. Received undefined error.
Here I have…

Pulikese
- 33
- 4
1
vote
0 answers
Loadable-Components as extenal components library with Next.JS
I am trying to use a component library that I created to reuse in other projects. In it I used loadable-components with webpack and code splitting.
But, when importing into a Next.js project, errors are returned, showing that you cannot import the…

hinschink
- 11
- 2
1
vote
0 answers
How to achieve code splitting + SSR with @loadable/component ? Is webpack needed for the server code?
I'm trying to add code splitting + SSR to my React web app using @loadable/component.
My current situation: This is how I've implemented SSR for robots on my website. Since it's just for robots, I'm not using hydrate. Basically, I send either the…

cbdeveloper
- 27,898
- 37
- 155
- 336
1
vote
2 answers
Some react Lottie Animations code-splitted with loadable crash on Gatsby development but work in prod
in our project we have around 10 animations that are using react-lottie library and are loaded with loadable-component library. Some of these animations are crashing on Gatsby development environment. I have managed to narrow down which ones are…

Digital Dom
- 412
- 5
- 12
1
vote
1 answer
SSR React Application using loadable library, throws “Cannot convert undefined or null to object” error intermittently on the server for Home Route
I have a (Server Side Rendered)SSR application built using React & Redux. I also use the loadable library. The application is hosted on Heroku and uses Cloudflare caching.
The application intermittently ends up in a 500 error on Heroku and I am not…

Deepak Kumar
- 11
- 2
1
vote
0 answers
Delaying the load of a @loadable/component
Trying to figure out why both of these are loading at the same time when I have a timeout of 10 seconds to load the footer. Currently I'm getting both load at the same time.
import loadable from '@loadable/component';
const Footer =…

me-me
- 5,139
- 13
- 50
- 91
1
vote
0 answers
why is Loadable Components throwing a requireAsync .then is not a function error
I'm trying to code-split a big file and have it lazily load async when needed.
Chrome dev tools is showing this error (see pic) when I try to click to the affected part of the webapp. Suggests I've not set something up properly, but i am following…

Aid19801
- 1,175
- 1
- 17
- 30
1
vote
1 answer
@loadable/server pass the whole stats JSON to eval('require')(modulePath)
I'm trying to setup SSR for react app with @loadable/components. I setup all based on docs with babel and webpack plugins. When I try to run node server.js it runs ok but when I open a browser and throws the following error (into node…

Max
- 404
- 2
- 17
- 39