851d51ebd6
Use Webpack as our bundler of choice, enabling improved JavaScript build chain capabilities. Props aduth, netweb, kadamwhite, schlessera. Fixes #40894. git-svn-id: https://develop.svn.wordpress.org/trunk@41752 602fd350-edb4-49c9-b593-d223f7449a82
22 lines
517 B
JavaScript
22 lines
517 B
JavaScript
var path = require( 'path' ),
|
|
SOURCE_DIR = 'src/',
|
|
mediaConfig = {},
|
|
mediaBuilds = [ 'audiovideo', 'grid', 'models', 'views' ],
|
|
webpack = require( 'webpack' );
|
|
|
|
|
|
mediaBuilds.forEach( function ( build ) {
|
|
var path = SOURCE_DIR + 'wp-includes/js/media';
|
|
mediaConfig[ build ] = './' + path + '/' + build + '.manifest.js';
|
|
} );
|
|
|
|
module.exports = {
|
|
cache: true,
|
|
watch: true,
|
|
entry: mediaConfig,
|
|
output: {
|
|
path: path.join( __dirname, 'src/wp-includes/js' ),
|
|
filename: 'media-[name].js'
|
|
}
|
|
};
|