diff --git a/config/webpack.js b/config/webpack.js index 2296537e2..67e43b6d6 100644 --- a/config/webpack.js +++ b/config/webpack.js @@ -5,17 +5,29 @@ const path = require('path') const _ = require('lodash') const pkg = require(path.resolve('package.json')) +let customConfig = {} +try { + require(path.resolve('.aegir.js')) +} catch (err) { +} const babel = require('./babel') // e.g. peer-id -> PeerId const libraryName = _.upperFirst(_.camelCase(pkg.name)) -let specific +let custom1 = {} +let custom2 = {} if (pkg.aegir && pkg.aegir.webpack) { - specific = pkg.aegir.webpack + custom1 = pkg.aegir.webpack +} + +if (customConfig && customConfig.webpack) { + custom2 = customConfig.webpack } +const specific = _.defaultsDeep({}, custom1, custom2) + const shared = { entry: [ require.resolve('babel-polyfill'), diff --git a/package.json b/package.json index e1ded03af..ad0bed77e 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,7 @@ "semver": "^5.1.0", "stream-http": "^2.3.0", "transform-loader": "^0.2.3", - "webpack": "^2.1.0-beta.4" + "webpack": "^2.1.0-beta.7" }, "repository": { "type": "git", @@ -83,4 +83,4 @@ "JGAntunes ", "dignifiedquire " ] -} \ No newline at end of file +}