Alter config or define path to tailwind.config.js with @roots/bud-tailwindcss

Hej,

is there a way to alter the config ord define the path to the used tailwind.config.js? I’d like to set up multiple instances, where each instance can use different configs. Or just with modified values from a based on.

Edit: The path to the tailwind config is a normal bud extension configuration field:
https://github.com/roots/bud/blob/204effd69cb630da28c29b19eff0db993e0d8e26/sources/%40roots/bud-tailwindcss/src/extension/index.ts#L43-L48
So you should be able to change the configuration field.

Hej @strarsis,

thanks for your answer. Unfortunatley I tried multiple things, but didn’t manage to set a value for an instance.

export default async bud => {
  await bud.make(
    { label: 'components', basedir: bud.path('resources/components') },
    async components => {
      components
        .setPath('@src', '.')
        .setPath('@dist', bud.path('build/components'))
        .entry({
          components: [`scripts/components.js`, `styles/components.css`],
        })

      components.extensions.get('@roots/bud-tailwindcss').config['tailwind.config.js'] = bud.path('resources/components/tailwind.config.js');
    })
}

Could you provide an example?

Hm, I take a look at that.