forked from geo-tp/Alpha-Core-Keira3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(conf): improve+update custom webpack configuration (azerothcore#…
- Loading branch information
1 parent
92c2588
commit b71c49c
Showing
8 changed files
with
13,736 additions
and
21,706 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** | ||
* Custom angular webpack configuration | ||
*/ | ||
|
||
module.exports = (config, options) => { | ||
config.target = 'electron-renderer'; | ||
if (options.customWebpackConfig.target) { | ||
config.target = options.customWebpackConfig.target; | ||
} else if (options.fileReplacements) { | ||
for (let fileReplacement of options.fileReplacements) { | ||
if (fileReplacement.replace !== 'src/environments/environment.ts') { | ||
continue; | ||
} | ||
|
||
let fileReplacementParts = fileReplacement['with'].split('.'); | ||
if (['dev', 'prod', 'test', 'electron-renderer'].indexOf(fileReplacementParts[1]) < 0) { | ||
config.target = fileReplacementParts[1]; | ||
} | ||
break; | ||
} | ||
} | ||
|
||
config.externals = { | ||
sqlite3: 'commonjs sqlite3', | ||
}; | ||
|
||
return config; | ||
}; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.