我正在开发一个使用VITE创建的Reaction应用程序.我正在try 使用tailwind ,并遵循tailwind 的官方文档中提到的步骤. 但是我的css没有被apply. 我正在使用react 与打字(多伦多证券交易所).谁能看一下我的代码片段,给我提个建议,我的配置中可能遗漏了什么?
这是我正在使用的包的列表.
"autoprefixer": "^10.4.16",
"tailwindcss": "^3.3.6"
"postcss": "^8.4.32",
"react": "^18.2.0",
"ts-node": "^10.9.1",
"typescript": "^5.3.2",
"vite": "^5.0.0"
这是我的trawind.config.js
/** @type {import('tailwindcss').Config} */
export default {
content: [
"./index.html",
"./src/**/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {},
},
plugins: [],
}
和我的postcss.config.js
export const plugins = {
tailwindcss: {},
autoprefixer: {},
};
我已经在我的index.css中包含了tailwind ,如下所示:
/* ./src/index.css */
@tailwind base;
@tailwind components;
@tailwind utilities;
但当我运行我的应用程序时,我无法获得任何应用程序的css.即在下面的H1标签中.
<h1 className="text-3xl font-bold underline">
Hello world...!
</h1>
我将非常感谢您的帮助和建议.