1

I'm new to CSS framework and I try to understand where I'm wrong in my configuration.

  • Install tailwind OK and works
  • Install flowbite JS via npm by these commandes : npm install flowbite

modified the tailwind.conf.js

/** @type {import('tailwindcss').Config} */
module.exports = {
  content: [
    "index.html",
    "./node_modules/flowbite/**/*.js",
  ],
  theme: {
    extend: {},
  },
  plugins: [
    require('flowbite/plugin')
  ],
}

I rebuild by run this tailwind command : npx tailwindcss -i ./src/input.css -o ./dist/output.css --watch

The last flowbite CLI command tells us to add the src JS code before the body close : <script src="../path/to/flowbite/dist/flowbite.min.js"></script>

I were sure that flowbite would have generated the 'flowbite.min.js'... but it doesn't ...

I'm sure that I missed something but I don't understand where ...

Could you please lead me ^^ ?

Thanks

I'm trying to make flowbite JS works

AlexSearha
  • 21
  • 1

1 Answers1

0

Just copy the flowbite.min.js file that is located in the following path: node_modules/flowbite/dist/flowbite.min.js within your dist/ folder. Then, as your index.html file is in the root folder, just set the new path as follows:

<script src="dist/flowbite.min.js"></script>

I had the same doubt, I tried that and it worked for me ;)