@scotty_walker
To run a Vite + Vue project frontend in WordPress, you can follow these steps:
- Build your Vite + Vue project: First, you need to build your Vite + Vue project to create the necessary files for the frontend. Run the npm run build command in your project directory to generate the build files.
- Copy the build files to your WordPress theme directory: Next, copy the build files (typically found in the dist directory) to your WordPress theme directory. You can create a new folder within your theme directory to store these files.
- Load the frontend files in your WordPress theme: To load the frontend files in your WordPress theme, you will need to enqueue the necessary scripts and styles in your theme's functions.php file. You can use the wp_enqueue_script() and wp_enqueue_style() functions to add the JavaScript and CSS files to your theme.
- Create a WordPress page template: Finally, you can create a WordPress page template that includes the necessary HTML structure and Vue components to render your Vite + Vue project. You can create a custom page template in your theme directory and use it to display your Vue application on a specific WordPress page.
By following these steps, you can run a Vite + Vue project frontend in WordPress and integrate it seamlessly with your WordPress website.