pingcrm-svelte icon indicating copy to clipboard operation
pingcrm-svelte copied to clipboard

Vite

Open masrodjie opened this issue 2 years ago • 2 comments

We need example inertiajs vite. So it should using Laravel 9

masrodjie avatar Aug 08 '22 21:08 masrodjie

We need example inertiajs vite. So it should using Laravel 9

Try this

import { defineConfig } from 'vite';
import { svelte } from '@sveltejs/vite-plugin-svelte';
import laravel from 'laravel-vite-plugin';
export default defineConfig({
    plugins: [
        laravel([
            './resources/css/app.css',
            './resources/js/app.js',
        ]),
        svelte(),
    ],
    optimizeDeps: {
        include: [
            "@inertiajs/inertia",
            "@inertiajs/inertia-svelte",
        ]
    },
});

MSufianS avatar Jan 10 '23 11:01 MSufianS

Hey, you can also find a working Vite example here:

https://github.com/inertiajs/inertia/tree/master/playgrounds/svelte

reinink avatar Jan 10 '23 12:01 reinink