Skip to main content
Filter by
Sorted by
Tagged with
-3 votes
1 answer
61 views

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 ...
Vight's user avatar
  • 31
0 votes
0 answers
87 views

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 ...
Tom Kur's user avatar
  • 2,440
1 vote
0 answers
132 views

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. ...
Amol Soans's user avatar
0 votes
0 answers
54 views

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.)...
mmozedev's user avatar
0 votes
1 answer
218 views

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 ...
Audiopolis's user avatar
1 vote
1 answer
70 views

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 ...
thegreyluk's user avatar
2 votes
4 answers
339 views

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<...
ncasteln's user avatar
  • 342
2 votes
0 answers
166 views

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 ...
Ahmed Afifi's user avatar
1 vote
1 answer
299 views

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 ...
Heru hoeruman's user avatar
2 votes
2 answers
1k views

I have two components. One of them is imported directly: import { directComp } from "./components"; another one is imported lazy: const lazyComp = import("./lazyProxy"); lazyProxy....
Slesarenko Alexander's user avatar
-1 votes
1 answer
154 views

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 ...
kavindu's user avatar
  • 46
0 votes
0 answers
28 views

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&...
icProgrammer2024's user avatar
5 votes
2 answers
10k views

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 ...
Bryan88's user avatar
  • 447
0 votes
1 answer
1k views

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?
D V Yogesh's user avatar
  • 3,720
-1 votes
1 answer
53 views

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&...
Oam Psy's user avatar
  • 8,663
0 votes
1 answer
2k views

I am trying to set up a new react project with a custom webpack config, and react router. I am using react 18, webpack 5, and react-router 6. Looking at my App.tsx, it sets up some routes. For now, ...
Seth Lutske's user avatar
1 vote
0 answers
2k views

I'm working on an embeddable widget for websites where clients embed the widget into their website using a script tag in the following format: <script src="https://embed.app.com/USER_ID"&...
Shaya Ulman's user avatar
  • 1,711
2 votes
1 answer
1k views

I have a component library that is published to npm, and installed in other projects. The library doesn't use dynamic imports. The components are exported in the library as follows: import { ...
xixhxix's user avatar
  • 123
2 votes
1 answer
524 views

I'm trying to implement Code Splitting in a React Native app. Currently I managed to load multiple bundles in Android both in packager mode and in production mode. However, on iOS I'm facing the ...
Dor Ben Baruch's user avatar
1 vote
0 answers
1k views

When I run npm run build with nuxt 3, it keeps giving me this warning Some chunks are larger than 500 kBs after minification. Consider: Using dynamic import() to code-split the application - Use build....
Vincenzo Locatelli's user avatar
1 vote
1 answer
1k views

I'm using Vue + Vite for my web app, and I use code-splitting in my router file for most of the routes, for example:  { path: "settings", name: "settings", component: () => ...
Perfect-Plant-4131's user avatar
0 votes
0 answers
30 views

I have code like below and I want to pass athlete to: AthleteInfo AthleteGroups AthleteContactInfo AthleteCompetitionHistory I have tried looking for a few different searches like, "code ...
demuro1's user avatar
  • 299
0 votes
0 answers
577 views

Technology used: React Typescript Webpack (Essentially an ejected create-react-app as we plan to move away from CRA) Lazy loading at each route (react-router) We've been diagnosing a large main bundle ...
Jon Chabot's user avatar
-1 votes
1 answer
998 views

I am trying to use react router with lazy loading. I still see the bundle being downloaded as one main.js. The router resides in an nx application and the routes that should be lazy loaded are in nx ...
Danny's user avatar
  • 7
1 vote
1 answer
2k views

I have a project: link. The project has router and lazy-components for every page. Short example router-component: export const RoutersComponent = () => { return ( <HashRouter basename={'/...
Roma N's user avatar
  • 320
1 vote
1 answer
332 views

I have my components structured to distinguish between top level Page components and then other lower level components. In my index.js I am lazy loading all my Page components, but the benefit is ...
Stewart Alan's user avatar
  • 1,653
2 votes
0 answers
789 views

Requirement: To prefetch the remote modules(module federated) during browser idle time in react. I've tried webpack magic comment webpackPrefetch: true but that did not work with module federation. I ...
macro's user avatar
  • 51
0 votes
1 answer
31 views

In my portfolio project there are some common html code snippet on about, projects, contact.html pages like navbar,footer and sidebar. The main app.js file contains toggling sidebar functionality, ...
Pradeep Jais's user avatar
2 votes
2 answers
1k views

Backstory: I'm working on a codebase which is primarily Python with Jinja templates because the site is mainly static. However, for interactive components we're using Preact to pre-render the ...
FreddieMixell's user avatar
0 votes
1 answer
4k views

I am a beginner in C++, I encountered a big problem when learning, I don't know if it is a problem with my editor or my computer, there is always an error, I look for a lot of answers, just can't ...
JornaJan Dev's user avatar
1 vote
1 answer
1k views

I have this code as a part of a Column having many children making it as long as 400 lines. Is it a good practice to split widgets like these into separate files? What is the recommended number of ...
Kartik's user avatar
  • 309
1 vote
0 answers
592 views

I am working on a Next.js app where I am using Ant Design for the UI components. To decrease the initial load time of the app, I have used dynamic imports for the header. However, doing so causes a ...
Ritik Jangir's user avatar
0 votes
2 answers
74 views

I'm working on a sheet that can be extracted from a system and all the data is in one cell so i need to split them and it is basic for all cells except for resutls. as you can see test results should ...
Qlowls's user avatar
  • 1
5 votes
0 answers
870 views

I have a project in Next.js and Typescript where I am trying to ensure code splitting and tree shaking works well for our purposes. I recently upgraded to Next.js 13.x and migrated from Babel to SWC. ...
zkwsk's user avatar
  • 2,146
3 votes
0 answers
150 views

For explaining this issue. I have created a sample project. I am using purescript. I am doing a dynamic import and webpack is generating 2 bundles. If I comment the dynamic import and use a static ...
Avinash Verma's user avatar
2 votes
0 answers
485 views

I have the following code to dynamically import based on routes, however it doesn't actually improve performance or decrease the bundle size in anyway? Am I missing something or is it just a case of ...
Mac's user avatar
  • 49
2 votes
0 answers
31 views

I am currently using createAsyncThunk to create async middlewares for a React-Redux app I am working on in the following manner: import axios from "axios"; import ApiUrls from "../...
anas1149's user avatar
3 votes
1 answer
1k views

I am working on a components library (such as material-ui). I am using rollup for compiling. For the moment I can generate a single package, and to import a component such as a button, I can do it ...
Ramzi B.'s user avatar
1 vote
0 answers
392 views

This is a topic that's been discussed a lot through github issues and by now I've noticed two main opinions: It's not possible or it should not be done at all. The argument for both sides is that ...
Koy's user avatar
  • 628
2 votes
0 answers
188 views

I'm writing a UMD library with webpack and when I try to import it in another project (for testing), it produces a "ChunkLoadError". The error goes away when I use normal imports. I'm trying ...
apeuda's user avatar
  • 41
1 vote
2 answers
1k views

Lately I've been deep diving more about JS modules, Webpack, the difference between ES modules and CommonJS, and I came across the dynamic import topic. I was curious on how Webpack converts the ...
hskris's user avatar
  • 399
0 votes
0 answers
478 views

Using route-based code splitting causes css duplicate in chunks. Steps to reproduce: Create simple app with create-react-app Use react-router-dom for client side routing Add one common component with ...
Miroslav Petrov's user avatar
2 votes
0 answers
313 views

I have a single .js file containing multiple exports. It looks like this: // some-functions.js export function plusOne(value){ return value + 1 } export function minusOne(value){ return ...
Nathaniel's user avatar
  • 462
3 votes
1 answer
2k views

I've been struggling over this error for a while now. It happens when I try to open react-bootstrap Modal with dynamically passed lazy component referrence and props to render it inside. It worked ...
bigless's user avatar
  • 3,141
1 vote
1 answer
446 views

I am trying to import components from a published npm package dynamically using react-loadable. The import is successful with components located in the src/ folder. However any components that I try ...
Jacques's user avatar
  • 11
2 votes
0 answers
2k views

I am trying to code splitting and lazy loading in my website but I am getting an error about Suspense boundary. Error: Uncaught Error: The server did not finish this Suspense boundary: The server used ...
lezan's user avatar
  • 787
1 vote
0 answers
951 views

Im trying to lazy load routes but no matter what I do, I only have one main chunk. Here is the route code. import React, { Suspense, lazy } from "react"; import { HomePage, ProductsPage, ...
zeshan ahmad's user avatar
1 vote
0 answers
612 views

We're developing a dashboard React-application in which other (trusted) developers can create their own React-widgets in separate environments. The goal would be a situation where new widgets wouldn't ...
SamRuk's user avatar
  • 11
3 votes
1 answer
7k views

I'm looking into using Next.js for it's hybrid SSG/SSR features. Why are JS chunks being packed into simple pages that should require ZERO JavaScript? The build command outputs: Route (pages) ...
quiltedbread's user avatar
-2 votes
3 answers
375 views

I have JSON output from SQL statement as below { "idno":6473853, "user":"GCA_GB", "operation":"U", "timestamp":"2022-08-...
raki Gowda's user avatar

1
2 3 4 5
10