From 5e8737a853c446b937a043ef6001ef5a77eca8ee Mon Sep 17 00:00:00 2001 From: huangwutao <346792184@qq.com> Date: Mon, 18 Jan 2021 17:17:19 +0800 Subject: [PATCH] =?UTF-8?q?v2.0.9=20=E6=96=B0=E5=A2=9E=E5=8F=AF=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E9=85=8D=E7=BD=AE=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/config.js | 4 +++- package.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) 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",