webpack - use mainFields: ['module', 'main'] for everyone

This commit is contained in:
Johannes Rieken
2018-09-13 11:48:06 +02:00
parent 5b223a4529
commit f1962fe5ad
9 changed files with 2 additions and 34 deletions

View File

@@ -23,7 +23,7 @@ module.exports = function withDefaults(/**@type WebpackConfig*/extConfig) {
__dirname: false // leave the __dirname-behaviour intact
},
resolve: {
mainFields: ['main'], // prefer the main-entry of package.json files
mainFields: ['module', 'main'],
extensions: ['.ts', '.js'] // support ts-files and js-files
},
module: {