code-splitting Questions
3
I had ended up doing some refactoring around routes to allow for code splitting but following the react/webpack instructions I've still got just the 2 entry bundles being generated.
Index.tsx
im...
Hardboard asked 29/11, 2019 at 22:25
13
If I make changes to my angular app the chunk names will change on build and the old version will be removed from the dist folder. Once deployed, if a user is currently on the site, and then naviga...
Dolerite asked 9/3, 2018 at 16:37
3
Solved
I have a 2 step Application Flow that looks like this:
const Step1 = React.lazy(() => import('./Step1'));
const Step1 = React.lazy(() => import('./Step2'));
<Suspense fallback={<Loadi...
Callboard asked 4/11, 2019 at 4:56
4
I've integrated Sentry with my website a few days ago and I noticed that sometimes users receive this error in their console:
ChunkLoadError: Loading chunk <CHUNK_NAME> failed.
(error: <WE...
Densify asked 3/9, 2021 at 15:33
4
I'm using lazy to split my routes and I wanna know if there is any way I can get the loading progress in lazy and suspense.
Currently I'm using it like this.
const Home = lazy(() => import("./...
Discretionary asked 24/1, 2019 at 2:54
1
I'm using Webpack 4.x and have the following in my config:
splitChunks: {
chunks: 'all',
},
runtimeChunk: true
This results in three chunks in my project:
app.prod.js
1.app.prod.js
2.app.prod...
Vaudois asked 30/7, 2018 at 21:20
7
Solved
I'm going migrate to Redux.
My application consists of a lot of parts (pages, components) so I want to create many reducers. Redux examples show that I should use combineReducers() to generate one...
Renege asked 6/10, 2015 at 10:45
0
I'm using esbuild to build my web-components using lit.
I'm now investigating code splitting to make my bundles smaller.
I generate a lot of components( ~100 ) that all have the same import stateme...
Saddlebow asked 21/7, 2022 at 11:12
0
Let's say I have 3 async chunks that were created by dynamic imports:
const Notes = lazy(() => import(/* webpackChunkName: "notes" */ 'pages/Notes'))
const Lists = lazy(() => import...
Morley asked 30/5, 2022 at 20:6
5
I recently learnt about lazy loading components and started using it. Now I am trying to prefetch the lazy loaded components as well as vue-router routes. But using the chrome devtools I found that...
Marathon asked 21/8, 2020 at 8:27
2
With only one output entry in my rollup.config.js like so:
export default {
input: './src/Index.tsx',
output: {
dir: './myBundle/bundle',
format: 'iife',
sourcemap: true,
},
plugins: [
type...
Lifesaver asked 12/1, 2021 at 19:22
1
Solved
To reduce the initial load of my app, i try to do code splitting.
For exemple, i successfully split twilio-video, to load and initialize when user press "call"
import('twilio-video').then...
Mitchmitchael asked 20/5, 2021 at 13:21
4
Here's an unexpected issue I've run into with Webpack code splitting in the wild: Imagine this scenario:
The user loads a React app with Webpack code splitting and a few bundle chunks are loaded
...
Califate asked 3/8, 2017 at 19:51
2
I'm using webpack 4.43.0.
How do I prevent codesplitting from happening in webpack? All these files are created - 0.bundle.js up to 11.bundle.js (alongside the expected bundle.js), when I run webp...
Orchestral asked 27/5, 2020 at 17:3
4
I have lots of code shared between web and web worker parts of my browser app.
How can I tell webpack to split my code up into common chunks so that the result is garanteed to work 100%?
The webw...
Bush asked 19/3, 2018 at 0:20
3
I've created a repository with a basic example that triggers this error in case it helps:
loadable-components-ssr
I'm trying to use Loadable Components in a SSR set up with react-router-dom 4.3.1...
Renfro asked 9/2, 2019 at 19:32
1
Solved
I have a react app running, and I wanted to add route based code-splitting using React.lazy to it.
Currently my code is,
import { PureComponent, cloneElement, Suspense, lazy } from 'react';
...
e...
Blubber asked 30/5, 2020 at 16:34
1
I am looking for a solution to split the big CSS file generated by Tailwind PostCSS plugin (combined with purgecss plugin) into multiple CSS files (one CSS file per consumer JS file). Consumed CSS ...
Rois asked 22/6, 2019 at 10:51
2
I am using create-react-app. I want to react-router base code-splitting but I want to get the first chunk which user open in browser and then get other chunks asynchronously in the background
Rout...
Casual asked 21/5, 2020 at 9:23
2
Solved
Is there a recommended approach for code splitting in Expo web projects?
I cant find anything in the docs, even on the web performance page: https://docs.expo.io/guides/web-performance/
Im surp...
Hypotension asked 30/4, 2020 at 8:22
1
Solved
I have a simple PWA app built with Webpack and React.
It has code splitting setup on dynamic imports (e.g. React.lazy(() => import('./SomeRoute'))) so different routes get different JS bundles, ...
Kop asked 23/4, 2020 at 8:41
8
In a webpack 3 configuration I would use the code below to create separate vendor.js chunk:
entry: {
client: ['./client.js'],
vendor: ['babel-polyfill', 'react', 'react-dom', 'redux'],
},
outpu...
Edroi asked 26/2, 2018 at 10:2
2
We are developing a Vue.js application based on Vue CLI 3 with Vue Router and Webpack. The routes are lazy-loaded and the chunk file names contain a hash for cache busting. In general, everything i...
Neisse asked 26/2, 2019 at 16:10
1
Solved
I understand that Suspense components are the React-ian approach to code splitting, which makes webpages load faster. Now, say you have a component hierarchy like this:
<App>
<Suspense f...
Bethsaida asked 26/10, 2019 at 18:11
1
Solved
We are working on a React component library. Some of the components need to updated without the need to redeploy the host app code. This is very much like say Google Maps library, where the client ...
Dulcie asked 5/5, 2017 at 13:17
1 Next >
© 2022 - 2024 — McMap. All rights reserved.