I currently have a project setup that uses the sass-loader WebPack plugin. This means that we can easily import SCSS from node_modules using the following:
@import "~bootstrap/scss/mixins/breakpoints";
Is there a way I can create a shortcut like above, to make imports of my own SCSS files a bit simpler. I would like to be able to convert for example:
@import '../../../../styles/app';
to
@import '~styles/app';
or even
@import 'styles/app';
I currently have the following resolver settings in my webpack.config.js:
// ....
resolve: {
alias: {
selectize$: path.join(__dirname, './node_modules/selectize/dist/js/selectize')
},
extensions: ['.ts', '.js'],
modules: ['./node_modules']
},
resolveLoader: {
modules: ['./node_modules']
}
//....