Reputation: 1
I can't get Tailwind to properly setup. The answers provided in this similar question all did nothing for me, so I'm not sure what I'm doing wrong.
I ran the command:
npx tailwindcss -i AD-WT-22s2-AT2-Pt1/src/tailwind-main.css -o AD-WT-22s2-AT2-Pt1/assets/css/tailwind.css --watch
and I'm fairly certain I've set the config up right.
content: [
"./src/**/*.{html,js,ts,jsx,tsx}",
"./**/*.{html,js,ts,jsx,tsx}",
"./**/*{html, js, jsx, ts, tsx}"
],
The relevant files are:
-main: tailwind-config.js
-src: tailwind-main.css (which contains @tailwind base, @tailwind components and @tailwind utilities)
-assets/css: tailwind.css
Upvotes: 0
Views: 165
Reputation: 1
Turns out there was some problems with one of the node modules and my package.json file should be in the root folder, so I deleted the node modules folder, moved the package.json file to the root, then did an npm reinstall and that did the trick
Upvotes: 0
Reputation: 1
maybe you have forgotten to link Tailwind's file in your index.html:
like:
<link href="/dist/output.css" rel="stylesheet">
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="/dist/output.css" rel="stylesheet">
</head>
<body>
<h1 class="text-3xl font-bold underline">
Hello world!
</h1>
</body>
</html>
Upvotes: 0