Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/atomjoy/vueon
Instalcja Vue z Vite w Laravelu w wybranym katalogu (vue-project).
https://github.com/atomjoy/vueon
atomjoy-vueon laravel laravel-vite laravel-vite-config laravel-vite-custom-dir laravel-vue-custom-dir laravel-vue-vite vue vue-laravel vue-vite-laravel
Last synced: about 2 months ago
JSON representation
Instalcja Vue z Vite w Laravelu w wybranym katalogu (vue-project).
- Host: GitHub
- URL: https://github.com/atomjoy/vueon
- Owner: atomjoy
- Created: 2022-11-22T10:09:24.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-07T08:44:09.000Z (about 2 years ago)
- Last Synced: 2024-05-04T22:42:11.575Z (8 months ago)
- Topics: atomjoy-vueon, laravel, laravel-vite, laravel-vite-config, laravel-vite-custom-dir, laravel-vue-custom-dir, laravel-vue-vite, vue, vue-laravel, vue-vite-laravel
- Language: PHP
- Homepage: https://github.com/atomjoy/vueon
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vueon
Instalcja Vue z Vite w Laravelu w wybranym katalogu (vue-project).
### Project Laravela
```sh
composer create-project laravel/laravel:^9.0 demo
```### Dodaj pakiet atomjoy/vueon
```sh
cd demo
composer require atomjoy/vueon 1.0.*
composer update
composer dump-autoload -o
```### Utwórz projekt Vue w Laravel
```sh
npm init vue@latest
cd vue-project
npm install
cd ..
```### Konfiguracja Vite
```sh
# Laravel root dir
php artisan vendor:publish --tag=vueon-config --force
```### Dodaj routes
```php
name('login');// Vue all routes
Route::fallback(function () {
return view('vueon::vue');
});
```### Uruchom aplikację
demo/vue-project
```sh
cd vue-project
# Vue build
npm run build
# Clear Laravel view cache
php artisan view:clear
# Php Laravel server
php ../artisan serve
```## Wyczyść view cache (dev mode)
Jeżeli przeglądarka nie pokazuje aktualnej strony lub pokazuje błąd wczytywania plików index.[hash].js wyczyść view cache w Laravelu i uruchom localny server ponownie.
```sh
php artisan view:clear
php artisan serve
```### Lub wyłącz view cache w Laravel (dev mode)
Dodaj do pliku config/view.php
```php
false,
// ...
]
```## Instalacja pakietów Vue
```sh
cd vue-project
npm install --save-dev axios
npm install --save-dev vue-i18n@9
npm install --save-dev @googlemaps/js-api-loader
```