Replies: 1 comment 2 replies
-
|
Here is my setup for a Laravel (Statamic) project I have. For this setup to work you'll need to install laravel-vite-plugin and @tailwindcss/vite as well. Also I noticed that if you import the whole preline js, that you'll need to install both of these packages, as otherwise you'll get a compilation error: vite.config.jsimport { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import tailwindcss from '@tailwindcss/vite'
export default defineConfig({
plugins: [
tailwindcss(),
laravel({
input: [
'resources/css/site.css',
'resources/js/site.js',
],
refresh: true,
}),
],
});resources/css/site.css@import 'tailwindcss';
@import "../../node_modules/preline/variants.css";
/* Any TW plugins you might have */
/* @plugin "@tailwindcss/forms"; */
/* @plugin "@tailwindcss/typography"; */
/* Not sure if this is necessary */
@source "../../node_modules/preline/dist";
/* Optional preline styles: https://preline.co/docs/index.html#optional-preline-styles */
@custom-variant hover (&:hover);
@layer base {
*,
::after,
::before,
::backdrop,
::file-selector-button {
border-color: var(--color-gray-200, currentColor);
}
}resources/js/site.jsimport 'preline';
// See: https://preline.co/docs/preline-javascript.html
window.HSStaticMethods.autoInit();Hope this is helpful for anyone wanting to get up and running with Laravel & Preline 3 :)) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Message is gone that doc's are not for tailwind V4.
But I still see :
2. Add the path to Preline UI JavaScript files in your tailwind.config.js file.
tailwind.config.js is not used in v4
So how to setup the Laravel 12 with tailwind v4 pre installed?
🤔
Beta Was this translation helpful? Give feedback.
All reactions