-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
theme.config.js file not found #29
Comments
Hm, your plugins: [
require('tailwindcss-theming')
], That error should not happen, and even less in the browser. If it had to happen, it would be at build-time, within Node. Can you tell me what are the steps to reproduce this? How do you build Tailwind? Also, is |
Hi, devDependencies: node 12.4 Nothing to reproduce but here is the branch I'm working on https://github.com/regenrek/vue-ts-css-in-js-dark-mode-example/tree/th EDIT: Did some more investigation.
|
The issue seems to reside in useTheme where you're resolving and building Tailwind at run-time.
You should make sure that you understand how Tailwind works: it's a PostCSS plugin. In your App.tsx, you directly import Tailwind's CSS. It kills its purpose since Tailwind is meant to be built based on your configuration, Either way, this is not an issue that I can solve. By the way, not sure if you knew, in a Vue CLI project, you can use |
Thanks for the tip about the runtime issue. This makes totally sense. Maybe there is a way around since presets work fine and the current problem exists only because of the use of fs (i guess) which is not available in browser. For the other part: I'm using twin.macro which allows me to use tailwind classes within css-in-js libraries like emotion - which is the goal of this repository. Tailwind classes won't be included in the production build (via babel macro). To finalize this repo it would be nice to have your theming system supported. https://twin-docs.netlify.app/plugin-support Regards! |
Not sure if it'll help, but the // tailwind.config.js
const { ThemeManager, Theme } = require('tailwindcss-theming/api');
const themes = new ThemeManager() // add your themes
module.exports = {
plugins: [
require('tailwindcss-theming')({
themes
})
]
} I didn't test, and it's possible that Can I close the issue? |
Hi,
first thanks for this awesome plugin really like the
theme manager approach!
I've some problems to load the custom
theme.config.js
file.tailwindcss-theming@next
The documentation is partly misleading but I tried all variations:
✅
❌
❌ documented in #18
The text was updated successfully, but these errors were encountered: