Skip to content

Commit

Permalink
chore(types): fix ts errors
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Nov 6, 2022
1 parent 0cb32bf commit 526ef59
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/nuxt-windicss/src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ export default defineNuxtModule<ModuleOptions>({
clearRequireCache(configFilePath)
configType = `./${relative(nuxtOptions.rootDir, configFilePath)}`
// Restart Nuxt if windi file updates (for modules using windicss:config hook)
// @ts-expect-error nuxt2
if (nuxt.options.dev && nuxt.options.watch)
// @ts-expect-error nuxt2
nuxt.options.watch.push(configFilePath)
}

Expand All @@ -172,7 +174,9 @@ export default defineNuxtModule<ModuleOptions>({
if (!filepath || !config)
return

// @ts-expect-error nuxt2
if (nuxt.options.dev && nuxt.options.watch)
// @ts-expect-error nuxt2
nuxt.options.watch.push(filepath)
// fix recursion
// delete config.plugins
Expand Down Expand Up @@ -280,7 +284,9 @@ export default defineNuxtModule<ModuleOptions>({
// only if they have postcss enabled
const nuxtPostcss
= nuxt.options.postcss /* nuxt3 */
|| nuxt.options.build.postcss.postcssOptions /* older nuxt3 */
// @ts-expect-error older nuxt3
|| nuxt.options.build.postcss.postcssOptions
// @ts-expect-error nuxt2
|| nuxt.options.build.postcss /* nuxt2 */
if (!nuxtPostcss)
return
Expand Down Expand Up @@ -401,6 +407,7 @@ export default defineNuxtModule<ModuleOptions>({
})
}
else {
// @ts-expect-error nuxt2
nuxt.options.cli.badgeMessages.push(message)
}
})
Expand Down

0 comments on commit 526ef59

Please sign in to comment.