Questions tagged [loadable-component]

53 questions
0
votes
1 answer

Load function from external script using @loadable/component in React

I have a JSON file with several filepaths to scripts that I want to be able to load dynamically into my React app, to build each component based on specifications that are in the metadata. Currently I have the metadata in my app as a Metadata data…
brienna
  • 1,415
  • 1
  • 18
  • 45
0
votes
1 answer

How to make placeholder for Loadable Component in React SSR

I'm working on a React app using typescript and loadable components (for SSR implementation) and trying to implement a placeholder for a loadable component to reduce shifting of the page on initial load (the page loads first, after a few seconds the…
JBird
  • 121
  • 1
  • 8
0
votes
0 answers

loadable component require not found with webpack

I am trying to learn how to do code-splitting through dynamic imports, but unfortunately I am getting an error as follows: Uncaught (in promise) ReferenceError: require is not defined at Function.requireEnsure [as e] (bootstrap:90) at…
0
votes
1 answer

Server side rendering and codesplitting using create react app and loadable components

Anyone have any experience converting a react app created with create-react-app to using server side rendering and code splitting via loadable-components? I know this is a general question, but mostly looking for general guidance or any major red…
0
votes
1 answer

@loadable/componet not loading on server side rendering

The loadable component on SSR not rendering on the server but works fine on the client-side. In my main container header and footer is rendering on server only component with loadable is not loading on server react version "react": "^16.12.0"…
TorreZz
  • 115
  • 10
0
votes
1 answer

Loadable Components SSR - chunkNames in Server Stats file different from Client stats file

I am trying to set up loadable-components for an SSR un-ejected CRA app. I'm using Craco to override Webpack config and it seems to be working, as the client side loadable-stats.json is being generated. When I run the build command, the chunks are…
0
votes
1 answer

Loadable/component React SSR throwing error on `getScriptTags`

I'm trying to set up SSR in my React app, which is using a private React component library, bundled with Rollup. Everything works fine, the app renders fine on the server, if I don't use @loadable/component and directly import each component. I…
-1
votes
1 answer

Are Next.js and Gatsby.js using the split code Loadable Component?

Are Next.js and Gatsby.js using the split code Loadable Component ? The loadable component I am talking about is the one recommended by the Facebook team https://github.com/gregberge/loadable-components I am lazy at searching this. If you reply I'll…
Thomas Aumaitre
  • 651
  • 1
  • 7
  • 17
1 2 3
4