webpack-config
webpack-config copied to clipboard
Feature: optional extend (aka silently fail on missing file)
right now we have two ways to build up an eventual configuration object from other files:
export default new Config().extend({
'core/foo': (config) => {
config.bar.forEach( (item) => { item.name = `${item.name}-foo`; })
}
})
or
export default new Config()
.extend('core/foo');
At the moment, if core/foo doesn't exist, then an error is thrown.
instead, let's specify a way to relax errors for missing files, then default to extending an empty object.
@airtonix I will try to find better way to do that and will post solution here before final merge.