For coders TYPO3 Tech Corner

Improve performance in the local development environment with Vite.

Improve performance in the local development environment with Vite.

Performance is an omnipresent topic in the tech world. Every day we discuss the performance of the latest processors or find ways to further optimize source code. Speed thus becomes an important factor for our customers as well as ourselves as a company.


But apart from the performance of a processor, developers are confronted with the speed of the local development environment on a daily basis. Especially for larger projects with slower build processes, performance can become a decisive factor here.

Vite wants to solve this problem for the frontend part of a project. Vite is a JavaScript build tool that aims to provide a faster and leaner development experience for modern web projects. The word "Vite" here comes from French and means "fast".
 

Vite Features:

Vite offers features such as "Instant Server Start", "Hot Module Replacement (HMR)" and support for Typescript, JSX and CSS without prior configuration. Vite's Hot Module Replacement feature ensures that changes are immediately visible, making the developer's job much easier. In addition, Vite abstracts a large part of the configuration, making it easier and more user-friendly.
 

Vite Performance:

When it comes to building and developing Vue.js apps, there are a number of front-end toolchains, each with their own merits. Some developers prefer to use a Webpack-based toolchain, while others prefer tools like Vite, which was developed in close cooperation with Vue. Based on some recent blog articles, it appears that Vite offers significant performance advantages over Webpack-based toolchains.

In an internal Vue 3 project we recently worked on, we were able to significantly reduce the startup time for both the dev server and the build times (Rollup) by switching to Vite. The dev server startup time was reduced from 5551 ms to 345 ms and the build time was reduced from 6244 ms to 4500 ms. Prior to this, the Webpack-based Vue-CLI Toolchain was in use.
 

Conclusion

In summary, Vite is an interesting tool if you are looking for a frontend toolchain for developing a web application with Vue.js or React. However, it is more difficult to integrate in the TYPO3 context due to the existing extension infrastructure. Have you already tried Vite? What experiences have you had? Let us know on Twitter!

"Code faster, look at the time" - does this sound familiar to you?

How about time and respect for code quality? Working in a team? Automated tests?

Join us

SQL: Show all tables sorted by size in descending order

Lately I've been using the SQL command more often to find out which tables in the TYPO3 database are the largest. I've published the snippet once.

Go to news

TYPO3 12 with CKEditor 5: Styles in a single selection

If you set a link in the RTE in TYPO3, you may have to choose between different link classes, for example to create buttons in the frontend. What's new in TYPO3 12 is that you can select not just one...

Go to news

Null-Safe Operator in the TYPO3 area

With the introduction of PHP8, problems with undefined arrays or variables in general can arise in many places. Here are a few examples and simple solutions.

Go to news

Delete the first/last lines of a (SQL) file

There isn't much to say about the following commands. Sometimes it can be useful to delete the first (or last) X lines from a file. And if the file is too large to open with a conventional program, a...

Go to news

b13/container: Add and modify child elements in edit view

Unlike gridelements, you cannot manage the child elements in the B13 Container extension when you open the container in the editing view. I would be happy to show you how you can quickly install this...

Go to news

Menu comparison: Numbers, numbers, numbers

Go to news