nuxt-hub / core

Build full-stack applications with Nuxt on CloudFlare, with zero configuration.
https://hub.nuxt.com
Apache License 2.0
819 stars 37 forks source link

After I upgraded "@nuxthub/core": "^0.5.14" to "^0.5.16" the following problem occurred #95

Closed dennisyang1986 closed 2 months ago

dennisyang1986 commented 2 months ago

repo:nuxt-todos-edge After I upgraded "@nuxthub/core": "^0.5.14" to "^0.5.16" the following problem occurred I tried to downgrade to 0.5.14, the WARN is still there

[nuxt:tailwindcss 00:41:38] WARN You have provided functional plugins in tailwindcss.config in your Nuxt configuration that cannot be serialized for Tailwind Config. Please use tailwind.config or a separate file (specifying in tailwindcss.configPath) to enable it with additional support for IntelliSense and HMR.

image

dennisyang1986 commented 2 months ago

I have found that the "pnpm update" command should not be used, otherwise it will definitely cause this result. only upgrading core to 0.5.16 won't be a problem.

image

dennisyang1986 commented 2 months ago

I have found the source of the error, so as not to mislead others, I will write down the specific reasons here

When running npm run dev, this module will look for these files: ./assets/css/tailwind.css ./tailwind.config.{js,cjs,mjs,ts} If these files don't exist, the module will automatically generate a basic configuration for them, so you don't have to create these files manually. You can create the tailwind.config.js file by running the following command: npx tailwindcss init

If you don't want to inject the CSS file, you can set cssPath to false , in nuxt.config.ts

export default defineNuxtConfig({
  tailwindcss: {
    cssPath: false,
  }
})

more info : https://tailwindcss.nuxtjs.org/getting-started/configuration

jits commented 2 months ago

@yangzhaokun — https://github.com/nuxt/ui/pull/1665 should fix this warning message (which is included in the just released v2.16.0 of Nuxt UI).