wordpress/webpack.config.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
540 B
JavaScript
Raw Normal View History

const blocksConfig = require( './tools/webpack/blocks' );
const mediaConfig = require( './tools/webpack/media' );
const packagesConfig = require( './tools/webpack/packages' );
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 ),
mediaConfig( env ),
packagesConfig( env ),
];
return config;
};