2018-12-13 16:25:37 +01:00
|
|
|
const mediaConfig = require( './tools/webpack/media' );
|
|
|
|
const packagesConfig = require( './tools/webpack/packages' );
|
2018-12-13 12:04:35 +01:00
|
|
|
|
2018-12-24 14:28:22 +01:00
|
|
|
module.exports = function( env = { environment: "production", watch: false, buildTarget: false } ) {
|
2018-12-13 16:25:37 +01:00
|
|
|
if ( ! env.watch ) {
|
|
|
|
env.watch = false;
|
|
|
|
}
|
2017-10-04 23:00:15 +02:00
|
|
|
|
2018-12-24 14:28:22 +01:00
|
|
|
if ( ! env.buildTarget ) {
|
|
|
|
env.buildTarget = ( env.mode === 'production' ? 'build/' : 'src/' );
|
2018-12-17 00:27:36 +01:00
|
|
|
}
|
|
|
|
|
2018-12-13 16:25:37 +01:00
|
|
|
const config = [
|
|
|
|
mediaConfig( env ),
|
|
|
|
packagesConfig( env ),
|
|
|
|
];
|
2018-12-11 17:38:21 +01:00
|
|
|
|
2018-12-13 16:25:37 +01:00
|
|
|
return config;
|
2018-12-11 17:38:21 +01:00
|
|
|
};
|