-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtailwind.config.js
More file actions
46 lines (44 loc) · 1.24 KB
/
tailwind.config.js
File metadata and controls
46 lines (44 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import fs from "node:fs";
import path from "node:path";
import { createRequire } from "node:module";
// Attempt to load a user tailwind config from content repo (staged at project root)
let userConfig = null;
const userConfigPath = path.resolve("tailwind.user.config.js");
if (fs.existsSync(userConfigPath)) {
try {
const require = createRequire(import.meta.url);
const mod = require(userConfigPath);
userConfig = mod.default || mod;
} catch { /* ignore */ }
}
/** @type {import('tailwindcss').Config} */
export default {
content: [
"./index.html",
"./src/App.vue",
"./src/themes/*/**/*.vue",
"!./src/themes/*/node_modules/**",
"./src/admin/**/*.vue",
"./src/pages/**/*.vue",
"./src/overrides/*/**/*.vue",
"!./src/overrides/node_modules/**",
"./src/*.{js,ts}",
"./src/themes/*/**/*.{js,ts}",
"!./src/themes/*/node_modules/**",
"./src/admin/**/*.{js,ts}",
"./src/lib/**/*.{js,ts}",
"./src/pages/**/*.{js,ts}",
"./src/utils/**/*.{js,ts}",
"./src/overrides/*/**/*.{js,ts}",
"!./src/overrides/node_modules/**",
...(userConfig?.content ?? []),
],
theme: {
extend: {
...(userConfig?.theme?.extend ?? {}),
},
},
plugins: [
...(userConfig?.plugins ?? []),
],
};