Make your web app faster with webpack code splitting

  Рет қаралды 11,891

vaadinofficial

vaadinofficial

Күн бұрын

Пікірлер: 21
@lars4953
@lars4953 4 жыл бұрын
Very informative, as always. I would be interested in a more detailed introduction in webpack, especially for PWA's.
@vaadinofficial
@vaadinofficial 4 жыл бұрын
So how to cache views and assets for offline? Or what kind of PWA setup are you looking for?
@lars4953
@lars4953 4 жыл бұрын
@@vaadinofficial Right, for offline would be great.
@RojusRzevuskis
@RojusRzevuskis 3 жыл бұрын
I pretty much hate late loading, countless times I would try to click something just to have layout change under my cursor. Or all the fun times when I have to sit there and wait, even though I can see the content that I want to interact with, but can't because I know it will change as soon as I go for it. Drives me nuts, I tell ya!
@vaadinofficial
@vaadinofficial 3 жыл бұрын
You definitely need to be mindful of what you defer. When you do it on a view-level, it's usually less of an issue. If you load something on the page, you may need to take some precautions to make sure it doesn't cause a lot of jumping around.
@nemnoton
@nemnoton 3 жыл бұрын
I'm wondering how you create the chunks? And those dynamic imports, what is being imported and how do you create such an asset? (maybe it is vaadin-related, I'm only familiar with vue)
@vaadinofficial
@vaadinofficial 3 жыл бұрын
Webpack creates chunks automatically when it encounters import() statements. The thing being imported is a JS module (a view in this case). The mechanics of how views are loaded in Vue are different, but the same webpack principles apply. The webpack documentation on code splitting can be helpful webpack.js.org/guides/code-splitting/
@nemnoton
@nemnoton 3 жыл бұрын
@@vaadinofficial I see, thanks for explaining! Seems like a great thing to utilize.
@Oswee
@Oswee 4 жыл бұрын
Great content as always! Now that basics are covered, we can extend this to the Redux sub-module level. Inject the module slice only when needed. Let's say at the same View level. :) (Dynamic Modules, Reducer Registry, etc)
@vaadinofficial
@vaadinofficial 4 жыл бұрын
The same idea applies for anything you can import. For something like Redux, you would probably want to import the needed things in the view itself, and split the bundles based on route.
@Oswee
@Oswee 4 жыл бұрын
@@vaadinofficial Yes. But Redux has a single store. And so there are some caveats.
@vaadinofficial
@vaadinofficial 4 жыл бұрын
The Redux docs have some tips on dealing with code splitting redux.js.org/recipes/code-splitting.
@Oswee
@Oswee 4 жыл бұрын
@@vaadinofficial Personally i did that already. Just keeping a discussion. :)
@vaadinofficial
@vaadinofficial 4 жыл бұрын
Great. Thanks for your comments. We'll definitely explore state management in future videos.
@hmartsocks
@hmartsocks 4 жыл бұрын
can you do a video on using fine-grained access control?
@vaadinofficial
@vaadinofficial 4 жыл бұрын
Sounds like a good idea. We'll add it to the idea backlog!
@justindb83
@justindb83 4 жыл бұрын
Does anyone have a base config setup with Lit-Element, Webpack 5.0 ? Can't seem to get webpack 5.0 working with Lit-Element
@xotic3196
@xotic3196 3 жыл бұрын
can this be used for my WordPress website please let me know
@vaadinofficial
@vaadinofficial 3 жыл бұрын
No, this is not directly applicable to WordPress. In WP, every page is a separate document, so they don't have the same need for this as single-page-apps.
@shankarsg1405
@shankarsg1405 4 жыл бұрын
Thank you for video... how to do it using Java API ?
@vaadinofficial
@vaadinofficial 4 жыл бұрын
Unfortunately, the Flow Java API doesn't support code splitting. You can load NPM dependencies dynamically with a small workaround discussed here github.com/vaadin/flow/issues/5623#issuecomment-533093977
Building a Vaadin app for production environments
13:39
vaadinofficial
Рет қаралды 3,2 М.
Know your Webpack bundle better with visualization
35:57
Swashbuckling with Code
Рет қаралды 10 М.
Это было очень близко...
00:10
Аришнев
Рет қаралды 7 МЛН
Disrespect or Respect 💔❤️
00:27
Thiago Productions
Рет қаралды 25 МЛН
Wait… Maxim, did you just eat 8 BURGERS?!🍔😳| Free Fire Official
00:13
Garena Free Fire Global
Рет қаралды 9 МЛН
Code Splitting Made Simple
28:11
Jack Herrington
Рет қаралды 45 М.
Making Load Times Ultra-Fast with webpack
1:08:26
hackcolab
Рет қаралды 7 М.
8 React Js performance optimization techniques YOU HAVE TO KNOW!
11:23
How is this Website so fast!?
13:39
Wes Bos
Рет қаралды 878 М.
Why Signals Are Better Than React Hooks
16:30
Web Dev Simplified
Рет қаралды 485 М.
Code Splitting in React JS - Lazy Loading Performance Optimization
16:10
Getting Started with Webpack 5 in 2021
43:34
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 33 М.
How to get polyfills with Babel 7 and Webpack
25:57
Swashbuckling with Code
Рет қаралды 12 М.
How To Load Images Like A Pro
15:48
Web Dev Simplified
Рет қаралды 382 М.