Currently in my WebPack 5 I use the following configuration, where I manually enter aliases, even if they all follow the same patter, How to be less verbose and have this configuration in a more generic way?
config.resolve.alias['components'] = path.resolve(__dirname, '../src/components')
config.resolve.alias['logic'] = path.resolve(__dirname, '../src/logic')
// more here