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-17 00:27:36 +01:00
|
|
|
module.exports = function( env = { environment: "production", watch: false, forceBuildTarget: 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-17 00:27:36 +01:00
|
|
|
if ( ! env.forceBuildTarget ) {
|
|
|
|
env.forceBuildTarget = false;
|
|
|
|
}
|
|
|
|
|
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
|
|
|
};
|