themesberg / flowbite

Open-source UI component library and front-end development framework based on Tailwind CSS
https://flowbite.com
MIT License
7.55k stars 715 forks source link

Why not work on localhost #634

Closed vanminhquangtri closed 7 months ago

vanminhquangtri commented 1 year ago

Hello everyone,

My app is: vue 3.3.4, flowbite 1.8.1, tailwindcss 3.3.3, vite 4.4.5, typescript 5.0.2

In my app, flowbite only work on http://127.0.0.1:8080. It not work on http://localhost:8080. It seems that Javascript not work on localhost.

For example, with dropdown:

I don't know what the problem is. This is my codes:

postcss.config.js:

module.exports = {
  plugins: {
    tailwindcss: {},
    autoprefixer: {},
  },
};

tailwind.config.js

/** @type {import('tailwindcss').Config} */
export default {
  content: [
    './index.html',
    './src/**/*.{vue,js,ts,jsx,tsx}',
    './node_modules/flowbite/**/*.js',
  ],
  theme: {
    extend: {},
  },
  plugins: [require('flowbite/plugin')],
};

I also attached the video show my problem

https://github.com/themesberg/flowbite/assets/70369658/1ad01cf5-3977-48ce-85ec-61921d0fb23b

haenno commented 1 year ago

If I had to guess, I would say it has something to with either your browsers' security settings or system settings.

Maybe you can provide more information on how you start the project and on what system it is running.

zoltanszogyenyi commented 7 months ago

Seems to be a local configuration error - given that Tailwind CSS and Flowbite is installed correctly then the project should work and CSS and the UI components should be functional.