vscode-blade-formatter
vscode-blade-formatter copied to clipboard
[Formatting Bug]: Slow on big HTML files
Platform
Linux
Template before formatting
Too long template (for example the ones of Keen Themes or any admin Saas template).
Template after formatting
Too long.
Expected Behaviour
The plugin takes several minutes (sometimes never finishes in a dozens minutes) to complete formatting a huge HTML page.
Relevant log output
No response
To avoid this problem, it is recommended to split huge blade files into components. https://github.com/shufo/blade-formatter/issues/616
You can use anonymous component to split large blade file. https://laravel.com/docs/11.x/blade#anonymous-components
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days
I am experiencing this as well. I have a 1500 line Blade file with TailwindCSS classes and some AlpineJS. Saving the file takes about 3 seconds each time. I don't want to split this file up into partials :-)
What is the difference between this VSCode plugin and the Prettier plugin you have by the way? Is there any advantage of running this VSCode plugin separately over using the Prettier plugin if I already have Prettier installed?