wordpress/webpack.config.js
Anton Timmermans 2588c1cae2 Build tools: Build @wordpress packages with webpack.
We decided to split the media webpack config into it's own file. The
main webpack config then combines this file with the packages config.

Include vendor scripts by copying them. We copy the minified files if
they are available. If they aren't available we minify the original
files ourselves.

Props omarreiss, herregroen, gziolo, youknowriad, netweb, adamsilverstein.
See #45065.


git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43719 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-11 10:00:16 +00:00

16 lines
336 B
JavaScript

const mediaConfig = require( './tools/webpack/media' );
const packagesConfig = require( './tools/webpack/packages' );
module.exports = function( env = { environment: "production", watch: false } ) {
if ( ! env.watch ) {
env.watch = false;
}
const config = [
mediaConfig( env ),
packagesConfig( env ),
];
return config;
};