Skip to content

Commit

Permalink
👍 Import bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
juzaweb committed Sep 1, 2023
1 parent b475fdd commit ba57a56
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 21 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
36 changes: 18 additions & 18 deletions resources/js/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
2 changes: 1 addition & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
18 changes: 16 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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==
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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==
Expand Down

0 comments on commit ba57a56

Please sign in to comment.