Closed Nefcanto closed 2 years ago
The tailwind/postcss config is loaded via nodejs. In ./tailwind.js
, you can't use import ... from
if the file is CJS. You should rewrite as this instead:
const defaultTheme = require('tailwindcss/defaultTheme')
Describe the bug
I'm trying to reuse some configurations.
For
tsconfig.json
, I reuse it usingextends
property.For
tailwind.config.js
I reuse it usingpreset
property.However, vite does not compile the code when we use these properties.
Reproduction
https://github.com/Nefcanto/ViteTailwindTsConfigReuse
Steps to reproduce
1-
npm create qwik@latest
2-npm run qwik add tailwind
3- Create atailwind.js
as the base 4- Create atasconfig.base.json
as the base 5- Reuse tailwind usingpreset
property 6- Reuse TypeScript config usingextends
property 7-npm run dev
8- Go to the home pageSystem Info
Used Package Manager
npm
Logs
Validations