sass-resources-loader: 1.3.0 can't find resources, but 1.2.1 can

Sass-resource-loader has been working fine with 1.2.1, but when I upgraded to 1.3.0 it stopped resolving the paths correctly.

Here’s my error-output. Note that it is looking for something in ../../scss/ a folder that has never existed on my setup.

ERROR in ./node_modules/css-loader!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js!./node_modules/sass-resources-loader/lib/loader.js?{“resources”:“[fullpath]/src/scss/_sass-resources.scss”}!./src/modules/header/header.scss Module build failed: $header-height: 790px; ^ File to import not found or unreadable: …/…/scss/src/scss/variables.

My webpack.config.js: module: { rules: [ { test: /\.scss$/, use: [ 'style-loader', 'css-loader', 'postcss-loader', 'sass-loader', { loader: 'sass-resources-loader', options: { resources: path.resolve(__dirname, './src/scss/_sass-resources.scss') } } ] },

My _sass-resources.scss:

@import '~bootstrap-sass/assets/stylesheets/bootstrap/variables'; @import '~bootstrap-sass/assets/stylesheets/bootstrap/mixins'; @import 'src/scss/variables'; @import 'src/scss/mixins';

Thanks in advance

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 5
  • Comments: 26 (13 by maintainers)

Most upvoted comments