Use a unique alias in WebPack 5

45 Views Asked by At

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
0

There are 0 best solutions below