/
githubmirror
/
tailwindcss
Обзор
Документация
Войти
/
githubmirror
/
tailwindcss
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
integrations/vite/html-style-blocks.test.ts
58 строк
1 KB
Rózsa Zoltán
feat: add Vite 7 support to the @tailwindcss/vite plugin (#18384)
24 июн 2025, 19:31
Не верифицирован
24 июн 2025, 19:31
aa85931
Код
Авторство
О чём код?
import { html, json, test, ts } from '../utils' test( 'transforms html style blocks', { fs: { 'package.json': json` { "type": "module", "dependencies": { "tailwindcss": "workspace:^" }, "devDependencies": { "@tailwindcss/vite": "workspace:^", "vite": "^7" } } `, 'vite.config.ts': ts` import { defineConfig } from 'vite' import tailwindcss from '@tailwindcss/vite' export default defineConfig({ plugins: [tailwindcss()], }) `, 'index.html': html` <!doctype html> <html> <body> <div class="foo"></div> <style> .foo { @apply underline; } </style> </body> </html> `, }, }, async ({ fs, exec, expect }) => { await exec('pnpm vite build') expect(await fs.dumpFiles('dist/*.html')).toMatchInlineSnapshot(` " --- dist/index.html --- <!doctype html> <html> <body> <div class="foo"></div> <style>.foo{text-decoration-line:underline}</style> </body> </html> " `) }, )