2023-06-07 19:44:16 +00:00
|
|
|
import { defineConfig } from "vite";
|
|
|
|
import laravel from "laravel-vite-plugin";
|
|
|
|
import vue from "@vitejs/plugin-vue";
|
2023-03-17 14:33:48 +00:00
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
server: {
|
|
|
|
host: "0.0.0.0",
|
|
|
|
hmr: process.env.GITPOD_WORKSPACE_URL
|
|
|
|
? {
|
2023-05-05 15:56:03 +00:00
|
|
|
// Due to port forwarding, we have to replace
|
2023-03-17 14:33:48 +00:00
|
|
|
// 'https' with the forwarded port, as this
|
2023-05-05 15:56:03 +00:00
|
|
|
// is the URI created by GitPod.
|
2023-03-17 14:33:48 +00:00
|
|
|
host: process.env.GITPOD_WORKSPACE_URL.replace(
|
|
|
|
"https://",
|
|
|
|
"5173-"
|
|
|
|
),
|
|
|
|
protocol: "wss",
|
|
|
|
clientPort: 443,
|
|
|
|
}
|
|
|
|
: {
|
|
|
|
host: "localhost",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
laravel({
|
2023-06-07 19:44:16 +00:00
|
|
|
input: ["resources/css/app.css", "resources/js/app.js"],
|
2023-03-17 14:33:48 +00:00
|
|
|
refresh: true,
|
|
|
|
}),
|
2023-05-10 13:49:56 +00:00
|
|
|
vue({
|
|
|
|
template: {
|
|
|
|
transformAssetUrls: {
|
|
|
|
base: null,
|
|
|
|
includeAbsolute: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}),
|
2023-03-17 14:33:48 +00:00
|
|
|
],
|
2023-05-10 13:49:56 +00:00
|
|
|
resolve: {
|
|
|
|
alias: {
|
2023-06-07 19:44:16 +00:00
|
|
|
vue: "vue/dist/vue.esm-bundler.js",
|
2023-05-10 13:49:56 +00:00
|
|
|
},
|
|
|
|
},
|
2023-03-17 14:33:48 +00:00
|
|
|
});
|