Wordpress/webpack.config.dev.js
Adam Silverstein 851d51ebd6 Build: Webpack instead of Browserify as JavaScript bundler.
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
2017-10-04 21:00:15 +00:00

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'
}
};