Vite WordPress is a simple and quick WordPress starter theme using the fastest build tool: Vite.
In your wp-config.php
file, you have to define a WP_ENV
constant according to your environment so that Vite WordPress can determine which assets need to be loaded.
In case you are in development mode, set the constant to development
.
define( 'WP_ENV', 'development' );
In production, set the constant to production
.
define( 'WP_ENV', 'production' );
Inside the starter theme, run :
$ yarn
# OR
$ npm install
Run your local backend server, then in your theme run :
$ yarn dev
$ yarn build
The theme currently doesn't work in dev environment with a https server. There is an infinite HMR reloading loop.