forked from bitwarden/clients
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtailwind.config.js
More file actions
34 lines (29 loc) · 1.15 KB
/
tailwind.config.js
File metadata and controls
34 lines (29 loc) · 1.15 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
/* eslint-disable */
const path = require("path");
const config = require("./libs/components/tailwind.config.base");
const webConfig = require("./apps/web/tailwind.config");
const browserConfig = require("./apps/browser/tailwind.config");
const desktopConfig = require("./apps/desktop/tailwind.config");
/**
* Pull together all the tailwind configs for the shared libs and clients for use in Storybook.
*
* Do not add new paths here directly. Add shared libs to tailwind.config.base.js, and add
* app-specific paths to their respective tailwind.config.js file
*/
config.content = [
...config.content,
...webConfig.webContent,
...browserConfig.browserContent,
...desktopConfig.desktopContent,
path.resolve(__dirname, ".storybook/preview.tsx"),
];
// Safelist is required for dynamic color classes in Storybook color documentation (colors.mdx).
// Tailwind's JIT compiler cannot detect dynamically constructed class names like `tw-bg-${name}`,
// so we must explicitly safelist these patterns to ensure all color utilities are generated.
config.safelist = [
{
pattern: /tw-bg-(.*)/,
},
];
config.corePlugins.preflight = true;
module.exports = config;