fix: temporary disable build.config hydration

This commit is contained in:
Pooya Parsa 2017-12-13 05:47:44 +03:30
parent cc74126fa6
commit 4f55aadd1e

View File

@ -36,11 +36,13 @@ Options.from = function (_options) {
options.rootDir = hasValue(options.rootDir) ? options.rootDir : process.cwd()
// Apply defaults by ${buildDir}/dist/build.config.js
const buildDir = options.buildDir || Options.defaults.buildDir
const buildConfig = resolve(options.rootDir, buildDir, 'build.config.js')
if (existsSync(buildConfig)) {
_.defaultsDeep(options, require(buildConfig))
}
// TODO: Unsafe operation.
// const buildDir = options.buildDir || Options.defaults.buildDir
// const buildConfig = resolve(options.rootDir, buildDir, 'build.config.js')
// if (existsSync(buildConfig)) {
// _.defaultsDeep(options, require(buildConfig))
// }
// Apply defaults
_.defaultsDeep(options, Options.defaults)