This extension provides instant Tailwindcss support to Laravel Mix builds.
First, install the extension.
npm install tailwind-mix --save-dev
Then, require it within your
webpack.mix.js file, like so:
let mix = ;;mix;
This package requires tailwind configuration (tailwind.js or tailwind.config.js), so don't forget to run:
npx tailwindcss init
Above command will create
tailwind.config.js file for you.
In case for any reason you want to change file name to different from default you can pass file path as an argument.
app.scss file example:
And you're done! Compile everything down with
npm run dev
More information about the Tailwind directives to your Sass/Less entry file.