From 20676e2f1871a05a84ede749601f5f9124ed7b3b Mon Sep 17 00:00:00 2001 From: Bubka <858858+Bubka@users.noreply.github.com> Date: Wed, 20 Sep 2023 16:06:01 +0200 Subject: [PATCH] Add the vite config file with basic Laravel setup --- vite.config.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 vite.config.js diff --git a/vite.config.js b/vite.config.js new file mode 100644 index 00000000..34167da0 --- /dev/null +++ b/vite.config.js @@ -0,0 +1,30 @@ +import { defineConfig } from 'vite'; +import laravel from 'laravel-vite-plugin'; +import vue from '@vitejs/plugin-vue'; + +export default defineConfig({ + plugins: [ + laravel([ + 'resources/sass/app.scss', + 'resources/js_vue3/app.js', + ]), + vue({ + template: { + transformAssetUrls: { + // The Vue plugin will re-write asset URLs, when referenced + // in Single File Components, to point to the Laravel web + // server. Setting this to `null` allows the Laravel plugin + // to instead re-write asset URLs to point to the Vite + // server instead. + base: null, + + // The Vue plugin will parse absolute URLs and treat them + // as absolute paths to files on disk. Setting this to + // `false` will leave absolute URLs un-touched so they can + // reference assets in the public directory as expected. + includeAbsolute: false, + }, + }, + }), + ], +}); \ No newline at end of file