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

Array syntax for configPaths #498

Closed
Tahul opened this issue Jul 11, 2022 · 0 comments · Fixed by #499
Closed

Array syntax for configPaths #498

Tahul opened this issue Jul 11, 2022 · 0 comments · Fixed by #499
Labels
enhancement New feature or request

Comments

@Tahul
Copy link
Contributor

Tahul commented Jul 11, 2022

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)
})
@Tahul Tahul added the enhancement New feature or request label Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant