Skip to content
This repository has been archived by the owner on Jun 18, 2019. It is now read-only.

Feature: optional extend (aka silently fail on missing file) #83

Open
airtonix opened this issue Mar 8, 2017 · 1 comment
Open

Feature: optional extend (aka silently fail on missing file) #83

airtonix opened this issue Mar 8, 2017 · 1 comment

Comments

@airtonix
Copy link

airtonix commented Mar 8, 2017

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.

@mdreizin
Copy link
Contributor

mdreizin commented Mar 8, 2017

@airtonix I will try to find better way to do that and will post solution here before final merge.

joelgallant added a commit to joelgallant/webpack-config that referenced this issue Oct 3, 2018
joelgallant added a commit to joelgallant/webpack-config that referenced this issue Oct 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants