ACF Blocks meets Svelte + Vite 🧡
Status: Work in progress 🧑🔧
Made with
Inspired by fgeierst/typo3-vite-demo. See more experiments: https://my-ddev-lab.mandrasch.eu/
Local development
ddev npm run dev
or ddev vite-serve start
Use define('WP_ENV','production');
or define('WP_ENV','development');
in wp-config.php
to simulate the environment. The default is development
.
Local first time setup:
ddev start && \
ddev wp core download && \
ddev launch
# Finish installation of WordPress in browser, afterwards:
ddev wp theme install raft && \
ddev wp theme activate raft-child && \
ddev npm install
ddev launch wp-admin/
to open https://ddev-wp-acf-blocks-svelte.ddev.site/wp-admin/
Now you can run either ddev npm run dev
or ddev vite-serve start
for local development.
templates/
folder was copied over to child theme because of current bug https://github.com/WordPress/gutenberg/issues/44243# WP Quickstart for DDEV
# https://ddev.readthedocs.io/en/latest/users/quickstart/#wordpress
ddev config --project-type=wordpress && ddev start && ddev wp core download && ddev launch
# Finish installation in browser
# Install ACF Pro for ACF Blocks feature
# https://www.advancedcustomfields.com/pro/
# We use the Raft theme by themeisle, with child theme:
ddev wp theme install raft && ddev wp theme activate raft-child
# Vite support (https://github.com/torenware/ddev-viteserve)
ddev get torenware/ddev-viteserve
# Modified /.ddev/.env for configuration
ddev npm init -y
ddev npm install --save-dev vite @sveltejs/vite-plugin-svelte
# Added scripts-section to package.json & create vite.config.js