Questions tagged [react-loadable]
137 questions
3
votes
1 answer
Webpack webpackChunkName magic comment does not work
I am trying to use react loadable and dynamic import to split code to multiple bundles. The split process works very well. However, when I try to use the magic comment webpackChunkName to let Webpack customize the bundle names, it always name my…

Kevin
- 1,271
- 9
- 14
2
votes
0 answers
React Loadable and Meteor separate bundle
I am using the following Component with Meteor
https://github.com/CaptainN/npdev-react-loadable
import { Loadable } from 'meteor/npdev:react-loadable';
I create my Loadable component as follows
const HomePageBlog = Loadable({
loading: () =>…

Anders Kitson
- 1,413
- 6
- 38
- 98
2
votes
1 answer
NextJS Dynamic Import of SSR component
Looking at the manner in which one can import react components in NextJS:
Plain old static import:
import Component from './Component';
[...]
return (
)
Dynamic import:
import dynamic from 'next/dynamic'
const DynamicComponent…

tunesmith
- 1,030
- 9
- 22
2
votes
1 answer
How to properly hydrate react app with code splitting on client
I am building a react app and I did code splitting on the client for the bundle. My app properly render on the server as I am using SSR, I have no code Splitting on the server but on the client I do. I am getting the following warning on client with…

user8989
- 580
- 2
- 6
- 21
2
votes
1 answer
react-loadable callback when load done?
Is there any callback for react-loadable when it loaded the component? I can not find any info in the document of react-loadable.

namgold
- 1,009
- 1
- 11
- 32
2
votes
1 answer
React loadable, preloadReady not loading modules
I'm running a Server rendered react app and having an issue with Loadable.preloadReady() resolving instantly, and not preloading the available modules.
My SSR is perfectly fine with preloadAll(), it understands which components are required, loads…

Tom Rowe
- 449
- 2
- 10
2
votes
1 answer
Cannot wrap video.js component in react-loadable
Here is the sandbox link: https://codesandbox.io/s/playvideo-e3dbw
I'm using video.js to display video in my react project, and it's imported in my component.
Now I want to use react-loadable to wrap cause video.js is…

Lee
- 63
- 6
2
votes
3 answers
there are some problems with typescript and react-loader
When I use typescript and react-loader, the console reported errors like this
This is for a new project test. using react-loadable to achieve dynamic loading
import Loadable from 'react-loadable';
const Home = Loadable({
loader: () =>…

chrisDeng
- 41
- 3
2
votes
1 answer
Webpack - Prevent file duplication with webpack code splitting & react-loadable
We've recently been looking at implementing code splitting into our complex web application to reduce the main bundle size. The main part that we're focussing on is dynamic imports using webpack & react-loadable.
I've come across something I deem to…

LT86
- 635
- 2
- 15
- 29
2
votes
0 answers
How to lazy-load a component from another git repository(used as an npm module)?
I have a git repository which I am importing as a npm module in my package.json file. Now I am trying to load this component using react-loadable, but my bundle.js size does not seem to reduce. Although I can see a chunk getting created, but it does…

Shruti Upreti
- 31
- 4
2
votes
1 answer
Jest + React Loadable error Not supported
I'm trying to test a component that renders a couple of asynchronously imported children with React Loadable like a Modal for example. My test looks like this
// Using React Testing Library
import { fireEvent, getByTestId, wait } from…

proko
- 175
- 2
- 11
2
votes
0 answers
Random chunks when using react-loadable to split code
I am using react-loadable to split my code. I have opted to do this at route level to begin with. My routes.js looks like this:
import React from 'react';
import { Route, Switch } from 'react-router-dom';
import Loadable from…

Andy Furniss
- 3,814
- 6
- 31
- 56
2
votes
1 answer
code splitting with Loadable from react-loadable causes screen flicker
I'm trying to apply code splitting to my React app. The below code is my routes with code splitting applied by Loadable from react-loadable. With the implementation, every time I access each page, the code chunk from webpack is properly loaded.…

Jay P.
- 2,420
- 6
- 36
- 71
2
votes
0 answers
rerendering page with react-loadable and hydrate in Reactjs
In my project, am using react-lodable plugin for lazyloading js files and hydrate for server side rendering. but after pagelayout completes, the webpage re-rendering whole page on client-side.
re-rendering problem comes while serving html from…

Nithish
- 369
- 1
- 8
- 20
2
votes
1 answer
Service worker on safari loading encrypted js
I am using code-splitting through react-loadable and service workers through offline-plugin. It works perfectly in chrome and firefox.
But it is not working properly on Safari. When I go to a different route, chunk js is loaded for that route and it…

Pranab Gupta
- 350
- 2
- 10