Error on SASS Partials in 1.x
See original GitHub issueHi @jhnns,
I am not a node-sass expert by any means, and so I cannot comment on exactly what the desired end result should be, but I make extensive use of SASS partials in my code and the handling of them seems to have changed when moving from 0.x to 1.x.
For example:
If I have file _my-partial.scss
, I would expect to (as working in 0.x) be able to reference it in my main SCSS file as @import "my-partial"
.
In 1.x, you have to explicitly write the underscore, but as I understand it, the underscore is what signifies to SASS that it is indeed a partial.
More info: http://sass-lang.com/guide
Many thanks for your hard work on sass-loader!
James
Issue Analytics
- State:
- Created 8 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
SASS global variables not being passed to partials
Basically I have a structure that used to work perfectly in 3.0.x and now it breaks with undefined variable ...
Read more >Importing Sass Partials - LearnHowToProgram.com
This lesson will explore how we can organize and modularize our styles by creating multiple Sass files, and importing into one another as...
Read more >Debugging Errors in Sass (How To) | CSS to Sass - Treehouse
In this video, we'll look at common errors that may happen when using Sass features like variables, ... it's happening in our containers.scss...
Read more >mixin and @include - Sass
Mixins allow you to define styles that can be re-used throughout your stylesheet. They make it easy to avoid using non-semantic classes like...
Read more >Sass error when not using Gulp: "File to import not found or ...
Change detected at 13:18:15 to: styles.scss error styles.scss (Line 20 ... Done installing documentation for zen-grids after 0 seconds 1 gem ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
webpack causing more problem than it solves. Why this would not work i don’t get it.
I ran into the same issue today when upgrading to 1.0.0. All my import statements of partials yielded ‘file to import not found’ errors. If it is intentional that partials should now be referenced with an underscore, a note should be added to the readme.
My setup is roughly: create a webpack config with
config.entry = ['./entry.js']
. Inentry.js
userequire('scss/app')
. Inscss/app.scss
use@import 'somepartial';
. Previously this would have loaded the filescss/_somepartial.scss
, but it now fails with an error.@import './somepartial';
fails as well. Using@import '_somepartial';
works however.Related question: Now issue #39 has been implemented, what is really the difference between a partial import and a regular file import?