Skip to content

firestar300/vite-wordpress

Repository files navigation

Vite ⚡️ WordPress

Vite WordPress is a simple and quick WordPress starter theme using the fastest build tool: Vite.

Get started 🚀

Set WP_ENV constant

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' );

Install dependencies

Inside the starter theme, run :

$ yarn

# OR

$ npm install

Development 🛠

Run your local backend server, then in your theme run :

$ yarn dev

Build 📦

$ yarn build

Known issues 🪲

HTTPS

The theme currently doesn't work in dev environment with a https server. There is an infinite HMR reloading loop.