#How do I deploy with vite!!

30 messages · Page 1 of 1 (latest)

gleaming sand
#

Watch your tone. Your very first message on this server and you start off with "this is horrible and this is rubbish". People would probably happily help you, but if you start off with such an attitude there'd be very little reason to help you.

olive gorge
#

Sorry but I got frustrated with the docs and how resources mostly consists of old versions

south bear
#

What do you mean "resources consists of old versions"?

olive gorge
south bear
#

The default Vite-directive handles the production build case as well, you should not replace these with your own script tags

olive gorge
#

Is that written inn the docs?

gleaming sand
olive gorge
#

lol my mistake sorry

south bear
olive gorge
#

Since you are more expert than me is there a way to automate migration procedures? In dotnet for example it would detect changes and automatically drop or make new fields, update keys etc...

south bear
#

php artisan migrate will automatically run any new migrations

olive gorge
#

Yoou need to run php artisan make:migrate then manually drop make new fields, right?

gleaming sand
olive gorge
#

too bad

#

Do you use Eloquent or other framework?

gleaming sand
#

Laravel comes bundles with Eloquent, why wouldn't you use that..? If you're not going to use that you're basically just fighting the framework with little to no benefit

#

Dotnet isn't Laravel, there are just going to be differences

olive gorge
#

@gleaming sand do I need to change the directive or not ========

#

Do I need to remove resources/css/app.css??

#

IIsnn't there a way for it to detect its on production?

gleaming sand
#

Change it to what..? Follow the docs, then Laravel will automatically detect it. If the Vite dev server isn't running it'll assume you've ran the build. So you probably haven't done that

#

You just use @vite('resources/js/app.css'), nothing more (as per the docs)

olive gorge
#

import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';

export default defineConfig({
plugins: [
laravel({
input: [
'resources/sass/app.scss',
'resources/js/app.js',
],
refresh: true,
}),
],
});

#

Do I need to change the configs??

gleaming sand
#

Well yeah, you have resources/sass/app.scss there, while in your blade template you're trying to use resources/css/app.css

olive gorge
#

Thanks ma

#

n