WordPress Scripts not building both blocks and index.js simultaneously
-
I am using the
@wordpress/scriptspackage to develop a block theme. All blocks are in./src/blocks/with individual block folders and correspondingblock.jsonfiles. The@wordpress/scriptspackage automatically builds all blocks into the./build/blocks/folder.I want to also compile and build the
./src/index.jsfile with all blocks. However, when I add./src/index.jsto thewp-scriptscommand, likewp-scripts start src/index.js, the blocks are not building. When I usewp-scripts startonly, then theindex.jsfile is not built.How can I modify the
webpack.config.jsfile to merge the configurations for building the blocks and theindex.jsfile so that they can be built simultaneously usingwp-scripts start?
The topic ‘WordPress Scripts not building both blocks and index.js simultaneously’ is closed to new replies.