tailwindcss icon indicating copy to clipboard operation
tailwindcss copied to clipboard

Replace addAutoImport usage with autoImport (and upgrade @nuxt/kit)

Open StefanCardnell opened this issue 3 years ago • 1 comments

Version

@nuxtjs/tailwindcss: 5.3.2 nuxt: 3.0.0-rc.9

Steps to reproduce

Add "@nuxtjs/tailwindcss" to nuxt.config.ts modules as expected:

// nuxt.config.ts
modules: ["@nuxtjs/tailwindcss"]

What is Expected?

No warnings

What is actually happening?

Warning received in console:

autoImports:extend hook is deprecated. Use addImports() from @nuxt/kit or imports:extend with nuxt>=3.0.0-rc.9

This is because @nuxtjs/tailwindcss is using addAutoImport from @nuxt/kit 3.0.0-rc.5, and thus uses the autoImports:extend hook without disabling the deprecation warning.

In @nuxt/kit 3.0.0-rc.9 the deprecation warning is disabled by default on the addImport method.

See changelog for details: https://github.com/nuxt/framework/releases

StefanCardnell avatar Sep 05 '22 11:09 StefanCardnell

This may be an issue with @nuxt/content, if I bump that version the warning goes away. Can you confirm?

genu avatar Sep 22 '22 16:09 genu