Skip to content

Commit 1c744ef

Browse files
committed
use esm on tailwind config to fix cjs warnings
1 parent 567b74d commit 1c744ef

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tailwind.config.js renamed to tailwind.config.mjs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
const defaultTheme = require('tailwindcss/defaultTheme');
1+
import defaultTheme from 'tailwindcss/defaultTheme';
22

3+
import Typography from '@tailwindcss/typography';
4+
import Forms from '@tailwindcss/forms';
35
import {
46
isolateInsideOfContainer,
57
scopedPreflightStyles,
68
} from 'tailwindcss-scoped-preflight';
79

810
/** @type {import('tailwindcss').Config} */
9-
module.exports = {
11+
export default {
1012
darkMode: ['selector', '.dark'],
1113
content: ['./app/**/*.{js,ts,jsx,tsx}', './src/components/**/*.{js,ts,jsx,tsx,mdx}'],
1214
theme: {
@@ -60,10 +62,8 @@ module.exports = {
6062
},
6163
},
6264
plugins: [
63-
require('@tailwindcss/typography'),
64-
require('@tailwindcss/forms')({
65-
strategy: 'class',
66-
}),
65+
Typography,
66+
Forms({strategy: 'class'}),
6767
scopedPreflightStyles({
6868
// pretty minimalistic example. Same options as in the previous example are available
6969
isolationStrategy: isolateInsideOfContainer('.tw-app'),

0 commit comments

Comments
 (0)