webpack - move __dirname-config up into shared config

This commit is contained in:
Johannes Rieken
2018-09-03 12:32:48 +02:00
parent 195ef80610
commit f82bcb20ed
9 changed files with 3 additions and 24 deletions

View File

@@ -19,6 +19,9 @@ module.exports = function withDefaults(/**@type WebpackConfig*/extConfig) {
let defaultConfig = {
mode: 'none', // this leaves the source code as close as possible to the original (when packaging we set this to 'production')
target: 'node', // extensions run in a node context
node: {
__dirname: false // leave the __dirname-behaviour intact
},
resolve: {
mainFields: ['main'], // prefer the main-entry of package.json files
extensions: ['.ts', '.js'] // support ts-files and js-files