webpack (with sass-loader) – scss file @import does not recognize resolve alias

I was able to use, on a stylesheet, an alias that I defined in webpack by using the following:

@import '~alias/variables';

just by prefixing the alias with ~ did the trick for me, as suggested by documentation in here

Leave a Comment