我使用"nPM Create vite@latest"设置了一个svelte应用程序, Select 使用Svelte和TypScript.我使用Vite作为服务器,并且我还按照说明here安装了TailWind CSS.
我的tailwind. connect.cjs代码:
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['./webapp/**/*.{svelte,html,ts}'],
theme: {
extend: {},
},
plugins: [],
}
我当前的app.css代码:
@tailwind base;
@tailwind components;
@tailwind utilities;
我在SRC文件夹中创建了一个rougs文件夹,其代码是:
<script>
import "../app.css";
</script>
<slot />
我不断收到这个错误:
warn - The `content` option in your Tailwind CSS configuration is missing or empty.
warn - Configure your content sources or your generated CSS will be missing styles.
warn - https://tailwindcss.com/docs/content-configuration
我已停止服务器并再次运行它,但也出现了同样的问题.我已经判断了内容目录一百万次,甚至try 使用特定的文件路径.我似乎无法让它发挥作用.有人能帮我解决这个问题吗?我还包含了我的工作文件夹的图像.我真的很感激给予的任何见解.working folder
以上或多或少描述了;在阅读了大量文档和观看了无数视频后,我不确定我做错了什么.与我合作的开发人员正在使用Svelte、TS和Tailwind CSS,否则我会try 不同的方法.