Make your web app faster with webpack code splitting

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

vaadinofficial

vaadinofficial

Күн бұрын

Пікірлер: 21
@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.
@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
@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.
@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
@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.
@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.
Building a Vaadin app for production environments
13:39
vaadinofficial
Рет қаралды 3,2 М.
Speed Up Your React Apps With Code Splitting
16:50
Web Dev Simplified
Рет қаралды 400 М.
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН
Webpack Tips - Totally Tooling Tips
8:16
Chrome for Developers
Рет қаралды 44 М.
How to get polyfills with Babel 7 and Webpack
25:57
Swashbuckling with Code
Рет қаралды 12 М.
Code Splitting Made Simple
28:11
Jack Herrington
Рет қаралды 45 М.
Optimize the bundle size of an Angular application
13:23
Angular
Рет қаралды 56 М.
8 React Js performance optimization techniques YOU HAVE TO KNOW!
11:23
How to Improve Performance in React with Code Splitting
9:55
PedroTech
Рет қаралды 214 М.
Your NextJS App is Too Big
14:16
Theo - t3․gg
Рет қаралды 64 М.
How To Load Images Like A Pro
15:48
Web Dev Simplified
Рет қаралды 393 М.
Stop Using Docker. Use Open Source Instead
12:40
DevOps Toolbox
Рет қаралды 160 М.
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН