Install Tailwindcss 2 di Laravel.
22 November, 2020 · #tailwind-css

Hapus dulu tailwind nya jika sudah di install

npm uninstall tailwindcss postcss autoprefixer

trus install yang baru dengan yang ini.

npm install tailwindcss@npm:@tailwindcss/postcss7-compat postcss@^7 autoprefixer@^9 postcss-import

Nah jika sudah, lakukan inisialiasi sprti ini.

laravelApp > npx tailwind init

buka resources/css/app.css masukkan tailwindcssnya

@import 'tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';

kemedia buka webpack.mix.js

mix.postCss('resources/css/app.css', 'public/css', [
    require('postcss-import'),
    require('tailwindcss'),
]);
Irsyad A. Panjaitan
By Irsyad A. Panjaitan
I teach with practical screencasts over on parsinta.com.
Follow the RRS Feed