Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the acf domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/evomark/public_html/wp-includes/functions.php on line 6121
Warning: Cannot modify header information - headers already sent by (output started at /home/evomark/public_html/wp-includes/functions.php:6121) in /home/evomark/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1896
Warning: Cannot modify header information - headers already sent by (output started at /home/evomark/public_html/wp-includes/functions.php:6121) in /home/evomark/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1896
Warning: Cannot modify header information - headers already sent by (output started at /home/evomark/public_html/wp-includes/functions.php:6121) in /home/evomark/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1896
Warning: Cannot modify header information - headers already sent by (output started at /home/evomark/public_html/wp-includes/functions.php:6121) in /home/evomark/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1896
Warning: Cannot modify header information - headers already sent by (output started at /home/evomark/public_html/wp-includes/functions.php:6121) in /home/evomark/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1896
Warning: Cannot modify header information - headers already sent by (output started at /home/evomark/public_html/wp-includes/functions.php:6121) in /home/evomark/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1896
Warning: Cannot modify header information - headers already sent by (output started at /home/evomark/public_html/wp-includes/functions.php:6121) in /home/evomark/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1896
Warning: Cannot modify header information - headers already sent by (output started at /home/evomark/public_html/wp-includes/functions.php:6121) in /home/evomark/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1896
{"id":789,"date":"2024-12-16T06:47:44","date_gmt":"2024-12-16T06:47:44","guid":{"rendered":"https:\/\/evomark.co.uk\/?page_id=789"},"modified":"2025-01-07T13:28:01","modified_gmt":"2025-01-07T13:28:01","slug":"wordpress-vite","status":"publish","type":"page","link":"https:\/\/evomark.co.uk\/open-source-software\/wordpress-vite\/","title":{"rendered":"WordPress Vite"},"content":{"rendered":"\n
Being quite fond of working with Laravel, one of the major pain points when coming to a WordPress site is the complexity in using JS frameworks and bundlers. Vite is especially tricky since during development, it utilises Hot Module Reloading which allows you to see the fruits of your labour on the browser the second you save your work.<\/p>\n\n\n\n
We\u2019d experimented with a few other solutions, but none of them had that \u2018it just works\u2019 feels of the Laravel\/Vite integration. So we figured, why not just port that to work with WordPress?<\/p>\n\n\n\n
There were a few technical challenges to overcome: the need for both theme development and plugin development compatibility; cache-busting of resources; integration with WordPress dependencies. Happily though, it just works.<\/p>\n\n\n\n
Installing the PHP Plugin<\/h2>\n\n\n\n
We\u2019ve listed this as an NPM project, but really it requires both a PHP package (installed as a plugin) and the NPM package working together to function.<\/p>\n\n\n\n