🤗Laravel Vite,@vite, JQuery and SASS (ok)

https://nono.ma/compile-sass-scss-vite-js

Chú ý 1: Cách để import từ node_modules

C:\xampp82\htdocs\lva5\resources\js\app.js

import jQuery from 'jquery';
window.$ = window.jQuery = jQuery;
import './bootstrap';
import '@coreui/utils/src';

Chú ý 2:

C:\xampp82\htdocs\lva6\resources\sass\app.scss

C:\xampp82\htdocs\lva6\package.json

C:\xampp8\htdocs\lva\vite.config.js

You can then load the built css file in your Blade views.

Áp dụng

Install JQuery in laravel 9 with Vite

Now add @vite(['resources/css/app.css', 'resources/js/app.js']) in blade file.

resources/views/welcome.blade.php

Last updated

Was this helpful?