vigetlabs / wordpress-site-starter

2 stars 0 forks source link

[#2] Vite WP build #21

Closed nathan-schmidt-viget closed 2 months ago

nathan-schmidt-viget commented 2 months ago

Summary

Tested out the other options for WP+Vite and there are not any packages that integrate with run dev - slack message

Updated our custom rolled Vite+WP. Changed all array() to [] and removed items we no longer need. Tweaked the vite.config so the HMR works correctly and UI devs see the changes right after they make them.

I am committing a few DDEV file as if we don't included them we need to also run a bunch of other DDEV scripts in order to get the vite server running.

Issues

Testing Instructions

  1. Run ddev start make sure the server starts.
  2. Make a JS or CSS edit and make sure it HMR and shows you the change.
  3. Test on both frontend and admin editor.

Screenshots

Apr-23-2024 09-51-46

bd-viget commented 2 months ago

@nathan-schmidt-viget Did you ever run into this error switching from mariadb to mysql?

Failed to start wpstarter: unable to start project wpstarter because the configured database type does not match the current actual database. Please change your database type back to mariadb:10.4 and start again, export, delete, and then change configuration and start. To get back to existing type use 'ddev config --database=mariadb:10.4' and then you might want to try 'ddev debug migrate-database mysql:8.0'

I wonder if I need to revert my ddev config, then upgrade mine locally. Do you happen to have the steps to do that?

empee3 commented 2 months ago

FWIW I am having the same issue as Brian and have the same question.

nathan-schmidt-viget commented 2 months ago

@bd-viget @empee3 here are the steps to change. Change back to mariadb 10.4 and then:

  1. Export your database in a text format ddev export-db
  2. ddev delete to destroy the old database
  3. ddev config --database=mysql:8.0 to change database type
  4. ddev start
  5. ddev import-db the exported sql.gz file.

I was never able to get the import of the old DB to run correctly so I just started from scratch.