1
- // @ts -check
2
1
import * as fs from 'fs/promises'
3
2
import * as path from 'path'
4
3
import { pathToFileURL } from 'url'
5
4
import { createJiti , type Jiti } from 'jiti'
6
- import postcss from 'postcss '
5
+ import { __unstable__loadDesignSystem } from 'tailwindcss '
7
6
// @ts -ignore
8
- import postcssImport from 'postcss-import '
7
+ import themeCss from 'tailwindcss/theme.css '
9
8
import { resolveCssFrom , resolveJsFrom } from '../resolve'
10
9
import type { UnifiedApi } from '../types'
11
10
@@ -44,9 +43,7 @@ interface ApiV4 {
44
43
export async function loadV4 ( mod : ApiV4 | null , stylesheet : string | null ) : Promise < UnifiedApi > {
45
44
// This is not Tailwind v4
46
45
if ( ! mod || ! mod . __unstable__loadDesignSystem ) {
47
- throw new Error ( 'TODO' )
48
- // TODO
49
- // mod = (await import('tailwindcss-v4')) as ApiV4
46
+ mod = ( await import ( 'tailwindcss' ) ) as ApiV4
50
47
}
51
48
52
49
// Create a Jiti instance that can be used to load plugins and config files
@@ -65,9 +62,7 @@ export async function loadV4(mod: ApiV4 | null, stylesheet: string | null): Prom
65
62
} else {
66
63
importBasePath = process . cwd ( )
67
64
stylesheet = path . join ( importBasePath , 'fake.css' )
68
-
69
- // TODO: bundled theme.css file?
70
- css = ''
65
+ css = themeCss
71
66
}
72
67
73
68
// Load the design system and set up a compatible context object that is
0 commit comments