Skip to main content
Version: 2.x

Compiling WP React Blocks

To compile plugins, just go to front/react-lib/wp-react-blocks-plugin/blocks​

Run

npm install
Then run the following command to compile the blocks​
npm run build

If you encounter issues during the build process with docker and wordpress, change your nginx config in the docker-compose.override.yaml file to the following:

docker-compose.override.yaml
nginx:
logging: *json_file
volumes:
- ./data/wordpress:/var/www/html
- ./common/react-lib/wp-content:/var/www/html/wp-content
- ./common/react-lib/wp-theme:/var/www/html/wp-content/themes/dg-semantic
- ./common/react-lib/wp-react-blocks-plugin:/var/www/html/wp-content/plugins/wp-react-blocks-plugin:ro
- ./common/nginx/tcdi.dev.conf:/etc/nginx/conf.d/default.conf:ro
- ./common/ui/src/scss/:/var/www/static/scss/:ro
environment:
VITE_REACT_APP_USE_HASH_LINKS: "false"
VITE_REACT_APP_WP_HOSTS: "localhost/wp,ng.tcdi.dgstg.org/wp"
VITE_REACT_APP_GA_CODE: ''