vueComponent/ant-design-vue-nuxt

Typescript error for extractStyle

chaule-diag opened this issue · 1 comments

I have this ts error when using extractStyle for solving page css flicker problem in nuxt.config.ts:

Type '{ extractStyle: true; }' is not assignable to type 'Partial<Partial<Options>>'.
  Object literal may only specify known properties, and 'extractStyle' does not exist in type 'Partial<Partial<Options>>'.

Here's my nuxt.config.ts

export default defineNuxtConfig({
  modules: [
    "@ant-design-vue/nuxt",
    // Other modules
    ],
    ...
  antd: {
    extractStyle: true,
  },
 ...
})

I have tried to ignore TS on that line by using // @ts-expect-error:next-line but in my app.ts, I have this waring: [Vue warn]: Failed to resolve component: a-extract-style

My app.ts:

<template>
  <a-extract-style>
    <NuxtLayout>
      <NuxtPage />
    </NuxtLayout>
  </a-extract-style>
</template>

My project: Nuxt 3.9.0, @ant-design-vue/nuxt 1.3.0

update 1.4.1