This repository was archived by the owner on Feb 23, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -21,9 +21,10 @@ module.exports = (css, settings) => {
2121 // clean up extra indent (indentedSyntax is not compatible with extra indenting)
2222 // they need to be cleaned up separately, and than concated
2323 const data = stripIndent ( optionData ) + '\n' + stripIndent ( cssWithPlaceholders )
24+ const file = settings . babel && settings . babel . filename
2425
2526 const preprocessed = sass
26- . renderSync ( Object . assign ( { } , settings . sassOptions , { data } ) )
27+ . renderSync ( Object . assign ( { } , { file } , settings . sassOptions , { data } ) )
2728 . css . toString ( )
2829
2930 return preprocessed
Original file line number Diff line number Diff line change @@ -122,12 +122,7 @@ describe('styled-jsx-plugin-sass', () => {
122122 const file = fs . readFileSync ( path . join ( __dirname , filename ) )
123123
124124 assert . equal (
125- plugin ( file . toString ( ) , {
126- sassOptions : {
127- includePaths : [ path . join ( __dirname , 'fixtures' ) ]
128- } ,
129- babel : { filename }
130- } ) . trim ( ) ,
125+ plugin ( file . toString ( ) , { babel : { filename } } ) . trim ( ) ,
131126 cleanup ( `
132127 * {
133128 font-family: "Comic Sans MS" !important; }
You can’t perform that action at this time.
0 commit comments