With webpack configuration it's possible to specify root of the resolving component:
resolve: {
root: [ path.join(__dirname, './src/') ],
extensions: ['', '.js', '.scss']
},
Now it is possible to import SASS file from ./src/
using tilde:
@import '~variables';
This import path will be resolved as ./src/variables
and everything works fine.
However IntelliJ doesn't recognize it properly and reports:
Cannot resolve file '~variables'
Is it possible somehow to configure this IDE to add extra resolve path (by default it resolves only from node_modules
directory)?