Leaving this for myself so I don't forget 😅
I want to make it possible to do something like this in your config:
plugins: [
'my-third-party-plugin',
'my-other-third-party-plugin',
]
...to make it safe to load your tailwind.config.js file in your front end bundles without accidentally bringing along a bunch of build dependencies.
The format I like the most so far is the Babel format:
{
"plugins": [
'simple-plugin-with-no-options',
[
'plugin-that-can-have-options-so-included-as-a-tuple',
{
optionA: 'banana',
optionB: 'sandwich'
}
]
]
}
Another note for myself — anything registered statically like this is really easy for me to register as a watchable file so I should do that too. That way if you have any custom plugins in your project, your CSS can automatically rebuild when you tweak those plugins.
Going to close this, no plans to add this right now. I would recommend a solution like babel-plugin-preval if you want to import your config into front-end code with the minimum bundle size increase instead.
Most helpful comment
Another note for myself — anything registered statically like this is really easy for me to register as a watchable file so I should do that too. That way if you have any custom plugins in your project, your CSS can automatically rebuild when you tweak those plugins.