File tree Expand file tree Collapse file tree 2 files changed +7
-11
lines changed Expand file tree Collapse file tree 2 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -10,14 +10,6 @@ module.exports = (css, settings) => {
1010 `/*%%styled-jsx-placeholder-${ id } %%*/`
1111 )
1212
13- // Add the directory containing the current file to includePaths to enable relative
14- // imports, only works when the filename is provided
15- const includePaths = settings . sassOptions && settings . sassOptions . includePaths || [ ] ;
16-
17- if ( settings . babel && settings . babel . filename ) {
18- includePaths . push ( path . dirname ( settings . babel . filename ) ) ;
19- }
20-
2113 // Prepend option data to cssWithPlaceholders
2214 const optionData = settings . sassOptions && settings . sassOptions . data || "" ;
2315 const data = optionData + "\n" + cssWithPlaceholders ;
@@ -26,8 +18,7 @@ module.exports = (css, settings) => {
2618 Object . assign (
2719 { } ,
2820 settings . sassOptions ,
29- { data } ,
30- { includePaths }
21+ { data }
3122 ) ) . css . toString ( )
3223
3324 return preprocessed
Original file line number Diff line number Diff line change @@ -121,7 +121,12 @@ describe('styled-jsx-plugin-sass', () => {
121121 const file = fs . readFileSync ( path . join ( __dirname , filename ) )
122122
123123 assert . equal (
124- plugin ( file . toString ( ) , { babel : { filename } } ) . trim ( ) ,
124+ plugin ( file . toString ( ) , {
125+ sassOptions : {
126+ includePaths : [ path . join ( __dirname , 'fixtures' ) ]
127+ } ,
128+ babel : { filename }
129+ } ) . trim ( ) ,
125130 cleanup ( `
126131 * {
127132 font-family: "Comic Sans MS" !important; }
You can’t perform that action at this time.
0 commit comments