Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Ritcheli's avatar

How to correct use vite in my laravel projects

Hello guys

I recently started to use vite in my laravel project and after some time my js code grow in complexity and I started to modularize it, my question is, the vite load all js files in all pages, even in those that don't need? what is the correct aproach to include my self made scripts and those who came by node modules?

I know that exists a plugin called as dynamic import, but how I use it?

0 likes
0 replies

Please or to participate in this conversation.