WordPress Scripts not building both blocks and index.js simultaneously
-
I am using the
@wordpress/scripts
package to develop a block theme. All blocks are in./src/blocks/
with individual block folders and correspondingblock.json
files. The@wordpress/scripts
package automatically builds all blocks into the./build/blocks/
folder.I want to also compile and build the
./src/index.js
file with all blocks. However, when I add./src/index.js
to thewp-scripts
command, likewp-scripts start src/index.js
, the blocks are not building. When I usewp-scripts start
only, then theindex.js
file is not built.How can I modify the
webpack.config.js
file to merge the configurations for building the blocks and theindex.js
file 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.