code-splitting Questions

2

We are building our new website entirely in React and utilizing code-splitting & scss. Whenever a new page is requested it loads the raw HTML in the browser first and then a split second or so ...
Gramarye asked 26/3, 2018 at 16:46

4

Solved

I'm trying to introduce code splitting into my app using react-loadable. I tried it on a very simple component: const LoadableComponent = Loadable({ loader: () => import('components/Shared/Log...
Veto asked 17/11, 2017 at 17:2

0

There seems to be a big vacuum on the internet when it comes to code-splitting Angular using Webpack 5 (SplitChunksPlugin). I've read pretty much all resources on the first and second page of googl...
Presentable asked 7/2, 2019 at 10:13

1

Solved

Using webpack, if I want to code-split an entire module, I can change import Module from 'module' at the top of my file to import('module').then(Module => {... when I need to use the module ...
Sightseeing asked 23/1, 2019 at 0:44

2

Solved

since we can import style sheets like below : <link rel="stylesheet" media="screen and (min-width: 900px)" href="widescreen.css"> <link rel="stylesheet" media="screen and (max-width: 600...
Sector asked 1/1, 2019 at 14:6

0

For example, say we have two components with a common import: ... import Hello from './Hello' class A extends Component {} and ... import Hello from './Hello' class B extends Component {} ...
Altar asked 29/12, 2018 at 0:49

1

I'm just starting on server side rendering a react 16 app using code splitting and dynamic import thanks to webpack 4 and react-loadable. My question might sound stupid but there's something I don...

1

I use ES6 dynamic import to accomplish code splitting in my React App. However, I'd like to auth protect the app, and noticed that when import() goes out to fetch JS chunks or CSS, it gets a 401, a...
Felixfeliza asked 18/10, 2018 at 21:56

2

Consider the react-admin app like presented below. I'm planning to code split in a way that everything in './posts' and './users' is only loaded after the user is logged in. I plan to use the dyna...
Speculum asked 11/5, 2018 at 5:9

1

I'm using React Loadable to code split my components, but the problem is that certain components are referenced from multiple locations. For example, I have this component CarsModule, which is refe...

1

I have the following webpack config: const path = require('path'); const webpack = require('webpack'); const CleanWebpackPlugin = require('clean-webpack-plugin'); module.exports = { entry: { so...
Jada asked 15/9, 2017 at 14:34

2

Using split chunks plugin with the following config : { entry: { entry1: [entry1.js], entry2: [entry2.js], entry3: [entry3.js], ... } optimization: { splitChunks: { chunks: "all" } } }...
Guardado asked 8/5, 2018 at 6:20

2

I’ve got a seemingly pretty straightforward Webpack code splitting setup that I’m having trouble migrating to Webpack 4. I have two entries, called main and preview. I want to do an initial code sp...
Spiky asked 15/3, 2018 at 11:49

3

Solved

How to import from a multiple class exported js file in react-loadable. I am trying to import CustomButton from MyButton.js using react-loadable in Home.js. This is the only way I know to do it, is...
Roentgenotherapy asked 2/5, 2018 at 15:3

1

Solved

This is probably a dummy question but after reading split-chunks-plugin documentation and this article about code splitting, i still can't understand what an async chunk refers to. The split-chunk...
Devy asked 6/6, 2018 at 22:33

1

I understand the great work that was done on webpack 4. Specially on rewriting the code splitting plugin. However, and since it's still kinda new, I don't find good documentation on the new SplitC...
Bookrack asked 22/5, 2018 at 22:43

1

I'm using gulp and I want to know if it has capabilities for code splitting. Something similar to what is mentioned here in the webpack site . Ive looked online but not seen anything dedicated to t...
Malatya asked 23/9, 2016 at 16:3

1

I have an application built with webpack that uses code splitting. I now want to aggregate all common modules that match specific criteria (in this case node_modules) across all entry chunks and al...
Danielson asked 7/12, 2017 at 13:15

1

Solved

Building a ReactJS application with Webpack. Recently interested in using code splitting to reduce app size. I've tried implementing a custom HOC that wrapped System.import(): /* async/index.tsx ...
Heinie asked 5/6, 2017 at 19:32

1

Solved

I have code splitting config similar to official docs and everything works perfect - all my node modules are in "vendor" chunk (including "babel-polyfill"). But now I need to move babel-polyfill an...
Domenicadomenico asked 27/6, 2017 at 15:42

1

Solved

I'm using Create-React-App and am looking to use the dynamic import() supported by webpack 2.0 to import a module based on a variable string. I've looked at the official proposal (https://github.c...
Jugendstil asked 24/5, 2017 at 18:50

2

Solved

What is the use of first parameter of webpack require.ensure first parameter? https://webpack.github.io/docs/code-splitting.html require.ensure(dependencies, callback) I tried to let the first par...
Homogenous asked 6/4, 2016 at 1:54

1

How can a web developer tell if a web app at a given URL is using code splitting, such as that provided by webpack, rollup or other libraries?
Sumy asked 5/5, 2017 at 7:9

0

For Webpack 2, does require() do anything different than require.ensure() for code spitting? I have a project that was converted from a requirejs base and require() still works and appears to be s...
Buttonhole asked 18/5, 2017 at 21:5

1

We use webpack 1.x with React to bundle our application. Furthermore, in order to bust caches when javascript files have changed we have our output set in webpack.config.js as: output: { path: __...
Francois asked 4/5, 2017 at 18:55

© 2022 - 2024 — McMap. All rights reserved.