mirror of
git://develop.git.wordpress.org/
synced 2025-01-17 12:58:25 +01:00
430c8b091b
See https://github.com/WordPress/gutenberg/pull/61692. See https://github.com/WordPress/wordpress-develop/pull/6678. Props youknowriad. Fixes #61324. git-svn-id: https://develop.svn.wordpress.org/trunk@58271 602fd350-edb4-49c9-b593-d223f7449a82
28 lines
810 B
JavaScript
28 lines
810 B
JavaScript
const blocksConfig = require( './tools/webpack/blocks' );
|
|
const developmentConfig = require( './tools/webpack/development' );
|
|
const mediaConfig = require( './tools/webpack/media' );
|
|
const packagesConfig = require( './tools/webpack/packages' );
|
|
const modulesConfig = require( './tools/webpack/modules' );
|
|
const vendorsConfig = require( './tools/webpack/vendors' );
|
|
|
|
module.exports = function( env = { environment: "production", watch: false, buildTarget: false } ) {
|
|
if ( ! env.watch ) {
|
|
env.watch = false;
|
|
}
|
|
|
|
if ( ! env.buildTarget ) {
|
|
env.buildTarget = ( env.mode === 'production' ? 'build/' : 'src/' );
|
|
}
|
|
|
|
const config = [
|
|
blocksConfig( env ),
|
|
...developmentConfig( env ),
|
|
mediaConfig( env ),
|
|
packagesConfig( env ),
|
|
modulesConfig( env ),
|
|
...vendorsConfig( env ),
|
|
];
|
|
|
|
return config;
|
|
};
|