const path = require( 'path' );
const defaultConfig = require( '@wordpress/scripts/config/webpack.config' );

module.exports = [
	{
		...defaultConfig,
		entry: {
			admin: path.resolve( __dirname, 'assets/admin/src/index.js' ),
			frontend: path.resolve( __dirname, 'assets/frontend/src/index.js' ),
		},
		output: {
			...defaultConfig.output,
			path: path.resolve( __dirname, 'assets/build' ),
		},
	},
	{
		...defaultConfig,
		entry: {
			index: path.resolve( __dirname, 'assets/block/src/index.js' ),
		},
		output: {
			...defaultConfig.output,
			path: path.resolve( __dirname, 'assets/block/build' ),
		},
	},
];
