Skip to content

Array syntax for configPaths #498

Description

@Tahul

Is your feature request related to a problem? Please describe.

It would be lovely if configPath key from the configuration supported an array of strings in addition to a single one.

This has no purpose for regular projects, but would be amazing for the ones that uses extends features, such as themes.

Describe the solution you'd like

Keep supporting:

tailwindcss: {configPath: '~/my-config-path.ts'}

But also support:

tailwindcss: {configPath: ['~/my-config-path.ts','~/my-config-other-path.ts']}

Describe alternatives you've considered

I'm currently using this workaround:

// Import Tailwind config and merge it here.
// Tailwind does not supports supplying multiple config paths.
nuxt.hook('tailwindcss:config', async (config) => {
const tailwindConfig = await import('./tailwind.config')
config = defuArrayFn(config, tailwindConfig)
})

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions