Inject @config "..." when a tailwind.config.{js,ts,...} is detected (#14635)
This PR injects a `@config "…"` in the CSS file if a JS based config has been found. We will try to inject the `@config` in a sensible place: 1. Above the very first `@theme` 2. If that doesn't work, below the last `@import` 3. If that doesn't work, at the top of the file (as a last resort)
This commit is contained in:
parent
4d1becd2f9
commit
fb1731a2de
8 changed files with 292 additions and 15 deletions
|
|
@ -330,7 +330,8 @@ export function test(
|
|||
return a[0].localeCompare(z[0])
|
||||
})
|
||||
.map(([file, content]) => `--- ${file} ---\n${content || '<EMPTY>'}`)
|
||||
.join('\n\n')}`
|
||||
.join('\n\n')
|
||||
.trim()}\n`
|
||||
},
|
||||
async expectFileToContain(filePath, contents) {
|
||||
return retryAssertion(async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue