File tree Expand file tree Collapse file tree 1 file changed +20
-22
lines changed
packages/tailwindcss-language-server/src/css Expand file tree Collapse file tree 1 file changed +20
-22
lines changed Original file line number Diff line number Diff line change @@ -10,30 +10,28 @@ const resolver = createResolver({
1010 conditionNames : [ 'style' ] ,
1111} )
1212
13- const resolveImports = postcss ( [
14- postcssImport ( {
15- async resolve ( id , base ) {
16- try {
17- return await resolveCssFrom ( base , id )
18- } catch ( e ) {
19- // TODO: Need to test this on windows
20- return `/virtual:missing/${ id } `
21- }
22- } ,
23-
24- load ( filepath ) {
25- if ( filepath . startsWith ( '/virtual:missing/' ) ) {
26- return Promise . resolve ( '' )
27- }
13+ export function resolveCssImports ( ) {
14+ return postcss ( [
15+ postcssImport ( {
16+ async resolve ( id , base ) {
17+ try {
18+ return await resolveCssFrom ( base , id )
19+ } catch ( e ) {
20+ // TODO: Need to test this on windows
21+ return `/virtual:missing/${ id } `
22+ }
23+ } ,
2824
29- return fs . readFile ( filepath , 'utf-8' )
30- } ,
31- } ) ,
32- fixRelativePaths ( ) ,
33- ] )
25+ load ( filepath ) {
26+ if ( filepath . startsWith ( '/virtual:missing/' ) ) {
27+ return Promise . resolve ( '' )
28+ }
3429
35- export function resolveCssImports ( ) {
36- return resolveImports
30+ return fs . readFile ( filepath , 'utf-8' )
31+ } ,
32+ } ) ,
33+ fixRelativePaths ( ) ,
34+ ] )
3735}
3836
3937export async function resolveCssFrom ( base : string , id : string ) {
You can’t perform that action at this time.
0 commit comments