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 6bc319c commit a0da2eeCopy full SHA for a0da2ee
src/config.ts
@@ -8,6 +8,12 @@ export const ctx = getContext<boolean>('tw-config-ctx')
8
const _defineConfig = createDefineConfig<Partial<Config>>()
9
export const defineConfig: typeof _defineConfig = (config) => {
10
const isNuxt = !!tryUseNuxt()
11
- return isNuxt || ctx.tryUse() ? config : requireModule('.nuxt/tailwind/postcss.mjs')
+
12
+ if (isNuxt || ctx.tryUse()) {
13
+ return config
14
+ }
15
16
+ const nuxtTwConfig = requireModule<Config>('./.nuxt/tailwind/postcss.mjs', { paths: [process.cwd()] })
17
+ return nuxtTwConfig?.default || nuxtTwConfig
18
}
19
export default defineConfig
0 commit comments