How to build BOTH non-block components and blocks present in the /src directory using @wordpress/scripts
Just add a webpack.config.js file at the root of your project with the following contents:
const defaultConfig = require( '@wordpress/scripts/config/webpack.config' );
module.exports = {
...defaultConfig,
entry: {
...defaultConfig.entry(),