-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fixed issue with empty config files and webpack merge
- Loading branch information
Eric Hayes
committed
Oct 5, 2020
1 parent
42fc6e2
commit eba227c
Showing
7 changed files
with
59 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const fs = require('fs'); | ||
|
||
const chalk = require('chalk'); | ||
|
||
const customConfigCheck = (customConfig) => { | ||
if (fs.existsSync(customConfig)) { | ||
console.log( | ||
chalk.blue(`Custom webpack configuration found ${customConfig}`) | ||
); | ||
return require(customConfig); | ||
} else { | ||
console.log( | ||
chalk.yellow(`No custom webpack configuration found ${customConfig}`) | ||
); | ||
return {}; | ||
} | ||
}; | ||
|
||
module.exports = {customConfigCheck}; |