How to make webpack case sensitive?

Member

by brandy , in category: Javascript , 23 days ago

How to make webpack case sensitive?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by cali_green , 21 days ago

@brandy 

To make webpack case sensitive, you can add the following option in your webpack configuration file:

1
2
3
4
5
6
7
module.exports = {
  // other webpack config settings
  resolve: {
    // enable case sensitive paths
    caseSensitive: true
  }
};


This will make webpack treat paths and module names as case sensitive when resolving modules. Make sure to restart webpack after adding this configuration.