From ba57a56fa089c39651beec1fd6692d22c237cb7e Mon Sep 17 00:00:00 2001 From: Juzaweb Date: Fri, 1 Sep 2023 13:24:01 +0700 Subject: [PATCH] :+1: Import bootstrap --- package.json | 1 + resources/js/app.tsx | 36 ++++++++++++++++++------------------ vite.config.js | 2 +- yarn.lock | 18 ++++++++++++++++-- 4 files changed, 36 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index 2aa1d681..95684f97 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "prettier-plugin-tailwindcss": "^0.1.13", "react": "^18.2.0", "react-dom": "^18.2.0", + "sass": "^1.66.1", "tailwindcss": "^3.2.1", "ts-loader": "^9.4.1", "typescript": "^5.1.6", diff --git a/resources/js/app.tsx b/resources/js/app.tsx index 9e085bc8..650ab32f 100644 --- a/resources/js/app.tsx +++ b/resources/js/app.tsx @@ -3,24 +3,24 @@ import { createInertiaApp } from '@inertiajs/react'; import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers'; import axios from "axios"; // For old js -import jQuery from '@types/jquery'; -import Popper from "popper.js"; -import $ from "jquery"; -import 'bootstrap'; -import Chart from 'chart.js/auto'; - -declare global { - interface Window { - jQuery: typeof jQuery; - $: typeof jQuery; - Chart: typeof Chart; - Popper: typeof Popper; - } -} - -window.$ = window.jQuery = $; -window.Popper = Popper; -window.Chart = Chart; +// import jQuery from '@types/jquery'; +// import Popper from "popper.js"; +// import $ from "jquery"; +// import 'bootstrap'; +// import Chart from 'chart.js/auto'; +// +// declare global { +// interface Window { +// jQuery: typeof jQuery; +// $: typeof jQuery; +// Chart: typeof Chart; +// Popper: typeof Popper; +// } +// } +// +// window.$ = window.jQuery = $; +// window.Popper = Popper; +// window.Chart = Chart; // Config axios axios.interceptors.request.use((config) => { diff --git a/vite.config.js b/vite.config.js index 388e6aa6..ce13c492 100644 --- a/vite.config.js +++ b/vite.config.js @@ -6,7 +6,7 @@ import path from "path"; export default defineConfig({ plugins: [ laravel({ - input: ['resources/js/app.tsx', 'vendor/juzaweb/modules/resources/css/app.css'], + input: ['resources/js/app.tsx', 'vendor/juzaweb/modules/resources/css/app.scss'], refresh: true, }), react(), diff --git a/yarn.lock b/yarn.lock index 2d583880..c7f69149 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3260,7 +3260,7 @@ chart.js@^4.0.1: dependencies: "@kurkle/color" "^0.3.0" -chokidar@^3.5.1, chokidar@^3.5.2, chokidar@^3.5.3: +"chokidar@>=3.0.0 <4.0.0", chokidar@^3.5.1, chokidar@^3.5.2, chokidar@^3.5.3: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== @@ -4751,6 +4751,11 @@ immutable@^3: resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.8.2.tgz#c2439951455bb39913daf281376f1530e104adf3" integrity sha512-15gZoQ38eYjEjxkorfbcgBKBL6R7T459OuK+CpcWt7O3KF4uPCx2tD0uFETlUDIyo+1789crbMhTvQBSR5yBMg== +immutable@^4.0.0: + version "4.3.4" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.4.tgz#2e07b33837b4bb7662f288c244d1ced1ef65a78f" + integrity sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA== + import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" @@ -6561,6 +6566,15 @@ safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== +sass@^1.66.1: + version "1.66.1" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.66.1.tgz#04b51c4671e4650aa393740e66a4e58b44d055b1" + integrity sha512-50c+zTsZOJVgFfTgwwEzkjA3/QACgdNsKueWPyAR0mRINIvLAStVQBbPg14iuqEQ74NPDbXzJARJ/O4SI1zftA== + dependencies: + chokidar ">=3.0.0 <4.0.0" + immutable "^4.0.0" + source-map-js ">=0.6.2 <2.0.0" + scheduler@^0.23.0: version "0.23.0" resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe" @@ -6844,7 +6858,7 @@ source-list-map@^2.0.0: resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== -source-map-js@^1.0.2: +"source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==