Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to config vite? #17

Closed
jtomek opened this issue Sep 20, 2023 · 0 comments
Closed

how to config vite? #17

jtomek opened this issue Sep 20, 2023 · 0 comments

Comments

@jtomek
Copy link

jtomek commented Sep 20, 2023

If you're looking for a way to make this work with vite, use this:

vite.config.js

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

export default defineConfig({
    plugins: [
        laravel({
            input: ["resources/css/app.css", "resources/js/app.js"],
            refresh: true,
        }),
    ],
    server: {
        hmr: {
            host: "localhost",
        },
    },
});

Don't forget to include this in your AppServiceProvider.php

public function boot(): void
{
    \Illuminate\Support\Facades\URL::forceScheme('https');
}
@jtomek jtomek closed this as completed Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant