Skip to content

Commit

Permalink
fix: vite is not loading
Browse files Browse the repository at this point in the history
  • Loading branch information
RoduanKD committed Aug 7, 2022
1 parent a8035f1 commit e217025
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 46 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"laravel/framework": "^9.19",
"laravel/sanctum": "^3.0",
"laravel/tinker": "^2.7",
"laravel/ui": "^3.3",
"laravel/ui": "^4.0",
"laraveldaily/larastarters": "^1.4"
},
"require-dev": {
Expand Down
49 changes: 11 additions & 38 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions resources/sass/app.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

// Tabler

$assets-base: "../../../dist" !default;

@import '~@tabler/core/src/scss/tabler';
@import '@tabler/core/src/scss/tabler';
5 changes: 2 additions & 3 deletions resources/views/layouts/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<meta name="description" content="">
<title>{{ config('app.name', 'Laravel') }}</title>

<link href="{{ asset('css/app.css') }}" rel="stylesheet">
@vite('resources/sass/app.scss')

<!-- Custom styles for this Page-->
@yield('custom_styles')
Expand Down Expand Up @@ -116,8 +116,7 @@ class="link-secondary">{{ config('app.name') }}</a>
</div>
</div>

<!-- Core plugin JavaScript-->
<script src="{{ asset('js/app.js') }}"></script>
@vite('resources/js/app.js')

<!-- Page level custom scripts -->
@yield('custom_scripts')
Expand Down
4 changes: 2 additions & 2 deletions resources/views/layouts/guest.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<meta name="description" content="">
<title>{{ config('app.name', 'Laravel') }}</title>

<link href="{{ asset('css/app.css') }}" rel="stylesheet">
@vite('resources/sass/app.scss')
</head>

<body class="border-top-wide border-primary d-flex flex-column">
Expand All @@ -26,7 +26,7 @@
</div>
</div>

<script src="{{ asset('js/app.js') }}"></script>
@vite('resources/js/app.js')
</body>

</html>
6 changes: 6 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import path from 'path';

export default defineConfig({
plugins: [
Expand All @@ -8,4 +9,9 @@ export default defineConfig({
refresh: true,
}),
],
resolve: {
alias: {
'~bootstrap': path.resolve(__dirname, 'node_modules/bootstrap'),
}
},
});

0 comments on commit e217025

Please sign in to comment.