Open antonio-ivanovski opened 6 months ago
Hey @toteto
import { content, plugin } from "flowbite-react/tailwind"
have you tried importing this way? this one works for me in my tailwind.config.ts
Hey @toteto
import { content, plugin } from "flowbite-react/tailwind"
have you tried importing this way? this one works for me in my
tailwind.config.ts
Have tried with the latest 0.10.1 version, still same issue. Still resorting to the patch.
Running into the same error on version 0.10.2 - "Cannot find module 'flowbite-react/tailwind' or its corresponding type declarations."
It's just a typescript error and my usage of Flowbite components isn't impacted.
FWIW, I can eliminate the typescript error by updating the tailwind.config.ts
like below, which causes CSS styling issues on the flowbite components.
module.exports = {
content: [
"./node_modules/flowbite/**/*.js"
],
plugins: [
require('flowbite/plugin')
]
}
@anshul-kai same error here. In my case this resolved both the warnings and styling problems:
/** @type {import('tailwindcss').Config} */
...
import flowbitePlugin from 'flowbite/plugin';
...
export default {
...
content: [
'./node_modules/flowbite-react/dist/esm/**/*.mjs',
],
plugins: [
flowbitePlugin
]
}
Thanks, @hgutierrez. It certainly is another solution for eliminating typescript errors, but I still require custom style overrides.
Steps to reproduce
import flowbite from 'flowbite-react/tailwind';
Current behavior
Getting error
Expected behavior
The config is loaded correctly
Context
The import in the
flowbite-react/tailwind
for theflowbitePlugin
needs to beimport flowbitePlugin from 'flowbite/plugin.js';
My current workaround is to do
pnpm patch
for this import.