diff --git a/lib/config.js b/lib/config.js index 1b50e11..132bb63 100644 --- a/lib/config.js +++ b/lib/config.js @@ -1,5 +1,7 @@ const path = require('path') -const config = require(path.resolve(process.cwd(), 'webpack.config.js')) +const argv = process.argv +const configDir = argv.find(item => item === '-f') ? argv[argv.findIndex(item => item === '-f') + 1] ? argv[argv.findIndex(item => item === '-f') + 1] : 'webpack.config.js' : 'webpack.config.js' +const config = require(path.resolve(process.cwd(), configDir)) class Config extends config { get default () { return this.webpack(_G.env, _G.packages, _G.entrys, _G.config) diff --git a/package.json b/package.json index 2bd37c8..9494fa1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dividing", - "version": "2.0.8", + "version": "2.0.9", "description": "a tool for multi-page project", "keywords": [ "splitter",