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

Static values to include in build #346

Open
pivotpointux opened this issue Feb 28, 2024 · 1 comment
Open

Static values to include in build #346

pivotpointux opened this issue Feb 28, 2024 · 1 comment

Comments

@pivotpointux
Copy link
Contributor

Is there a way to have some parts of the built tailwind.config file static? i.e. other than 'content' or 'plugins' can we specify some parts of the config file that we know won't change and so we can define this in another object and pass in, so that this is included when the file is built?

@BJJLangedijk
Copy link
Contributor

I've solved this by using a tailwind.config.extended.js. You will need to update your other tools like ESLint/Prettier/PostCSS/... to use this config instead of the generated one

import baseConfig from './tailwind.config';

/**
 * Extend the base config with customizations that are required
 * for the project but are not returned from the tokens.
 *
 * This file will be imported by postcss and used  to generate
 * the final tailwind configuration.
 */
export default {
	...baseConfig,
	// overrides
}

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

No branches or pull requests

2 participants