File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
packages/tailwindcss-language-server/src/util/v4 Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import type { DesignSystem } from '@tailwindcss/language-service/src/util/v4'
2
2
3
3
import postcss from 'postcss'
4
4
import { resolveCssImports } from '../../css'
5
+ import { resolveFrom } from '../resolveFrom'
5
6
6
7
const HAS_V4_IMPORT = / @ i m p o r t \s * (?: ' t a i l w i n d c s s ' | " t a i l w i n d c s s " ) /
7
8
const HAS_V4_THEME = / @ t h e m e \s * \{ /
@@ -38,8 +39,16 @@ export async function loadDesignSystem(
38
39
39
40
// Step 3: Take the resolved CSS and pass it to v4's `loadDesignSystem`
40
41
let design : DesignSystem = await tailwindcss . __unstable__loadDesignSystem ( resolved . css , {
41
- loadPlugin ( ) {
42
- return ( ) => { }
42
+ async loadPlugin ( id : string ) {
43
+ let resolvedPath = resolveFrom ( filepath , id )
44
+
45
+ return import ( resolvedPath ) . then ( ( m ) => m . default ?? m )
46
+ } ,
47
+
48
+ async loadConfig ( id : string ) {
49
+ let resolvedPath = resolveFrom ( filepath , id )
50
+
51
+ return import ( resolvedPath ) . then ( ( m ) => m . default ?? m )
43
52
} ,
44
53
} )
45
54
You can’t perform that action at this time.
0 commit comments