webpack (with sass-loader) - scss file @import does not recognize resolve alias
问题 My project structure: webpack.config.js app-- --> src ---->> components ------>>> myComponent.js ------>>> myComponent.scss --> styles ---->> variables.scss In webpack.config module.exports: ... resolve: { alias: { styles: path.join(__dirname, 'app/styles') } } In my file - myComponent.scss: @import "styles/variables"; I am getting this error when building bundle.js: Module build failed: @import "styles/variables"; ^ File to import not found or unreadable: styles/variables How can I @import