-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Examples fail #1
Comments
@bencergazda The error you get using the examples is due to a windows specific compatibility issue with sass-extract that was fixed in Regarding the empty file generated in your project, can you please provide the build log from webpack when this happens, including the webpack version. It might be some other loader that is interfering with the extract loader which will show there. Make sure to run webpack with the added flag Please provide the output that looks something like this example:
Also, have you tried building your project with something very simple in the sass file like |
@jgranstrom Thanks for your prompt answer. I've just made it work, the problem was really simple, I realized that webpack tries to use also the pre-configured I didn't get any error, just the following, but this was enough to find the problem:
Your plugin is really killer! :-) Now I'm gonna make my Sass |
Great to hear that you sorted it out. I'm sure this can be the case for some configurations. It would be interesting to see how you have configured your default loaders and how you import your style files to see if we can make this more consistent. I tested an example with the following webpack configuration
A very simple entrypoint file:
Importing the file twice, first using the defaults to get the css, and then with the extract loader without using the skip flags ( For this example the css is applied to the page and variables are extracted correctly. I also tested this with an import statement which worked without any issues. Maybe you are using some additional plugins that might change this behavior in some way, such as the extract css plugin? I'd be happy to hear if you find something else related to this that can be improved! |
I will close this since the original issue is resolved. Feel free to reopen it or make another issue if you have any more troubles |
I checked the @import-s in a reduced test environment.
The second case when it fails is when using the Unfortunately I don't really understand how Webpack resolves these imports yet, whether the loader allows supporting more the "official" syntax, but if so, it would be cool. :-) Update Now I see you launched new version for both plugins. I'm going to check it, hopefully today. :-) |
@bencergazda check out the newest sass-extract version Regarding the tilde there is a lot of factors with the environment etc that can impact how this works. For now one option for you is to add the home path to |
I really appreciate your work with this loader and the
sass-extract
plugin, I think this is the long-sought chain link for my sass project. But unfortunately both examples fail on my localhost. I have node 6.9.4 installed, on Windows.Both the 'basics' and the 'visual' examples fail with the following (or similar) error:
When I am trying to use the module in my own project, webpack builds an empty JS file where I include sass-extract-loader like
const styleVariables = require('sass-extract-loader!./style.scss');
.Am I doing something wrong?
Thank you in advance for your help.
UPDATE
Looks like manually updating the
sass-extract
dependency version to^0.4.0
for both examples solves the problem. Trying to figure out why still fails in my project...The text was updated successfully, but these errors were encountered: