Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: css intellisense not working #596

Merged
merged 2 commits into from
Jan 25, 2023
Merged

Conversation

nazar1ua
Copy link
Contributor

Workaround for #593

@nazar1ua
Copy link
Contributor Author

@atinux there are also bug with content, it isn't working, like documented, there are my .nuxt/tailwind.config.cjs:

"files": [
  "utils/**/*.ts",
  "content/**/*.md",
  "/home/nazar/development/website/components/**/*.{vue,js,ts}",
  "/home/nazar/development/website/layouts/**/*.vue",
  "/home/nazar/development/website/pages/**/*.vue",
  "/home/nazar/development/website/composables/**/*.{js,ts}",
  "/home/nazar/development/website/plugins/**/*.{js,ts}",
  "/home/nazar/development/website/App.{js,ts,vue}",
  "/home/nazar/development/website/app.{js,ts,vue}",
  "/home/nazar/development/website/Error.{js,ts,vue}",
  "/home/nazar/development/website/error.{js,ts,vue}"
],

So, can I fix it in this pr?

@nazar1ua
Copy link
Contributor Author

I want make this (

tailwindConfig.content = [...(tailwindConfig.content || []), ...contentPaths]
):

tailwindConfig.content = [...(tailwindConfig.content && tailwindConfig.content.map(src => `${nuxt.options.srcDir}/${src}`) || []), ...contentPaths] // TODO: support `extends` directories

@atinux
Copy link
Collaborator

atinux commented Jan 24, 2023

@nazar1ua you have to make sure content is added before tailwind module.

@nazar1ua
Copy link
Contributor Author

@atinux I'm sorry, but I don't understand you

Copy link
Collaborator

atinux commented Jan 25, 2023

What's your nuxt.config.ts ?

@nazar1ua
Copy link
Contributor Author

@atinux

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  modules: [
    '@nuxt/content',
    '@nuxtjs/tailwindcss',
    '@nuxtjs/color-mode',
    '@nuxtjs/google-fonts',
    '@vueuse/nuxt',
  ],
  googleFonts: {
    families: {
      'Open Sans': [400, 500, 600, 700],
      'IBM Plex Sans': [400, 500, 600, 700],
    },
    display: 'swap',
    preconnect: true,
    download: true,
  },
  colorMode: {
    classSuffix: '',
  },
  experimental: {
    payloadExtraction: false,
  },
  app: {
    head: {...}
  },
})

@nazar1ua
Copy link
Contributor Author

Classes are generated correctly, but I think, It would be better, it there will only relative or only absolute paths, not mix of them

@atinux atinux merged commit de81e7d into nuxt-modules:main Jan 25, 2023
@nazar1ua nazar1ua deleted the patch-1 branch January 26, 2023 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants