We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 385d534 commit 66adcf1Copy full SHA for 66adcf1
packages/headwind/src/config.ts
@@ -185,8 +185,18 @@ export const defaultConfig: HeadwindConfig = {
185
presets: [],
186
}
187
188
-// eslint-disable-next-line antfu/no-top-level-await
189
-export const config: HeadwindConfig = await loadConfig({
+// Lazy-loaded config to avoid top-level await (enables bun --compile)
+let _config: HeadwindConfig | null = null
190
+
191
+export async function getConfig(): Promise<HeadwindConfig> {
192
+ if (!_config) {
193
+ _config = await loadConfig({
194
name: 'headwind',
195
defaultConfig,
196
})
197
+ }
198
+ return _config
199
+}
200
201
+// For backwards compatibility - synchronous access with default fallback
202
+export const config: HeadwindConfig = defaultConfig
0 commit comments