vueComponent / ant-design-vue-nuxt

MIT License
73 stars 8 forks source link

Typescript error for extractStyle #37

Closed chaule-diag closed 10 months ago

chaule-diag commented 10 months ago

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

aibayanyu20 commented 10 months ago

update 1.4.1