464 questions
-3 votes
1 answer
61 views
Can web worker help split Vite result js file?
I am using Vite to build react application. And I have a js file with data (it is just a word dictionary). The file is big, its size is 28MB. Now it is imported and use in code directly. So built js ...
0 votes
0 answers
87 views
load all pages used causing slow loading page
I am using laravel + inertiajs + react to build a website. the problem is when when I go to the home, it loads all pages including the ones are not needed on Home. it is causing the page load slow. it ...
1 vote
0 answers
133 views
Chrome Extension Code Splitting with React.lazy + Vite - Chunk Loading Fails Despite Background Script Exclusion Body:
I’m building a Chrome extension using React 18 and Vite 5, trying to implement code splitting for optimization. Despite excluding background scripts from splitting, I’m getting chunk loading errors. ...
0 votes
0 answers
54 views
Webpack (Craco) code splitting on build (environment-based splitting)
We have a React Craco app which we serve to different markets/countries. This means the majority of the code is used by all markets, but also every market has its own code (components, functions, etc.)...
0 votes
1 answer
219 views
React lazy components with poor internet connectivity and error boundaries: Failed import due to poor connectivity seems to be cached even when online
In an "offline-first" app (which optimistically updates local state and gracefully handles errors by rolling back local state changes, for example), some features may still require internet ...
1 vote
1 answer
70 views
Angular Components Structure in Divs
I am questioning myself of whether or not to structure my Angular components in sub divs, to make the html better. I do have a main page and a overview component. Is it good practices in Angular to ...
2 votes
4 answers
339 views
How to style Angular parent and child component
I'm learning Angular 18 while I already know React. I have a "pretty big" HTML file, which I would like to split. Let's take this pseudo and minified example: <ul> <li>Hello<...
2 votes
0 answers
166 views
How to improve code-splitting with ReactJS and ViteJS
I am building an application using ReactJS and ViteJS, and i am trying to do code-splitting to reduce the after build chunk sizes and request them only when needed. I have tried to use lazy loading ...
1 vote
1 answer
299 views
How to splitting code shadcn form component in React/NextJs
I have just started learning Next.js and shadcn, but I am confused about how to split the code in the form component because my code has already reached 4000 lines. How can I split it to make it ...
2 votes
2 answers
1k views
Webpack puts lazy-loaded module into main chunk
I have two components. One of them is imported directly: import { directComp } from "./components"; another one is imported lazy: const lazyComp = import("./lazyProxy"); lazyProxy....
-1 votes
1 answer
155 views
Dynamic import path for React Native
I want to do is I want to import React-Native dynamic path. example: import Demo from `./screens/${path}`; I found one method using lazy, but it also only working when initialize const variable like ...
0 votes
0 answers
28 views
Separating the code tag from the text and html in C#
I have an HTML file, for example, the content of the following code <td><input readonly="readonly" class="input_field" onclick="highlight(this);" type="text&...
5 votes
2 answers
10k views
Vue & Vite disable code splitting / chunking
I have built a small application in Vue/TypeScript and with Vite and i am trying to build the files using vite build but this is chunking the files. The file is to be placed on other peoples website ...
0 votes
1 answer
1k views
difference between code splitting and lazy loading in react
I am not super clear on the meaning of load here - does it mean loading into the memory or fetching over the network and load into the memory?
-1 votes
1 answer
53 views
Reduce Import/Site Size of React Window Popup
I have a react app that has >10 pages and imports a number of npm modules. import ReactDOM from "react-dom/client"; import { BrowserRouter, Routes, Route } from "react-router-dom&...