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

Remove prefix as a function #5829

Merged
merged 4 commits into from
Oct 19, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
mark prefix as a function as a breaking change
  • Loading branch information
RobinMalfait committed Oct 19, 2021
commit def80a51188d7c88edab7ec2b5f00485a893e85e
12 changes: 12 additions & 0 deletions src/util/normalizeConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,18 @@ export function normalizeConfig(config) {
return []
})()

// Normalize prefix option
if (typeof config.prefix === 'function') {
log.warn('prefix-function', [
'As of Tailwind CSS v3.0, `prefix` cannot be a function.',
'Update `prefix` in your configuration to be a string to eliminate this warning.',
// TODO: Add https://tw.wtf/prefix-function
])
config.prefix = ''
} else {
config.prefix = config.prefix ?? ''
}

// Normalize the `content`
config.content = {
files: (() => {
Expand Down