-
Notifications
You must be signed in to change notification settings - Fork 55
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
Update from version 3.2.0 to latest 4.1.0 breaks build. Undefined scss variables #78
Comments
Same for me with 4.1.0 |
Seems that since 4.0.0 and #71 you need to call the function on the jsonImporter you import/require e.g. const jsonImporter = require('node-sass-json-importer');
module.exports = {
css : {
options: {
importer: jsonImporter,
...
},
}
} should now be const jsonImporter = require('node-sass-json-importer');
module.exports = {
css : {
options: {
importer: jsonImporter(),
...
},
}
} |
yes, i saw that in documentation and it was the first thing i tried, but when calling the function it marks 'invalid' css which is in fact totally valid! It seems to have a problem with the json file. But the json structure is absolutely valid json and previous version of node-sass-json-importer could deal with it.
|
IMHO this is an issue with #74 and that commit should be reverted in order to fix it. The reasoning behind this is that sass either expects an object literal with a @pmowrer would you accept a pull request reverting that behavior? |
@Tylerian Can both be supported? E.g. if |
…tly" Reverts feature adding `fileName` field to the returned object, because [returning both `fileName` and `contents` is unexpected per the docs](https://sass-lang.com/documentation/js-api#importer) breaking the importer, as reported in #78. This reverts commit 3d34986.
…tly" Reverts feature adding `fileName` field to the returned object, because [returning both `fileName` and `contents` is unexpected per the docs](https://sass-lang.com/documentation/js-api#importer) breaking the importer, as reported in #78. This reverts commit 3d34986.
…tly" Reverts feature adding `fileName` field to the returned object, because [returning both `fileName` and `contents` is unexpected per the docs](https://sass-lang.com/documentation/js-api#importer) breaking the importer, as reported in #78. This reverts commit 3d34986.
Closed by #83 |
Thanks! |
Hello @pmowrer ,
for my current project we updated the node-sass-json-importer from version 3.2.0 to version 4.1.0 but that causes the build to break with error message of undefined variables. The variables it complains about are normal scss variables within scss files which are not part of any json file (see screenshot). Any idea?
The project setup is build with grunt. Using node-sass und grunt-sass.
The relevant part in grunt config is the following:
It would be unfortunate circumstances if we would be forced to stick with an old version of node-sass-json-importer unable to update.
Best regards, Annick
The text was updated successfully, but these errors were encountered: