All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 4m10s
The login page references 'images/logo.svg' via vite()->asset(), which requires the file to be present in the build manifest. Adding it to the input array ensures it is processed and listed in manifest.json.
51 lines
1.4 KiB
JavaScript
51 lines
1.4 KiB
JavaScript
import { defineConfig, loadEnv } from "vite";
|
|
import vue from "@vitejs/plugin-vue";
|
|
import laravel from "laravel-vite-plugin";
|
|
import path from "path";
|
|
|
|
export default defineConfig(({ mode }) => {
|
|
const envDir = "../../../";
|
|
|
|
Object.assign(process.env, loadEnv(mode, envDir));
|
|
|
|
return {
|
|
build: {
|
|
emptyOutDir: true,
|
|
},
|
|
|
|
envDir,
|
|
|
|
server: {
|
|
host: process.env.VITE_HOST || "localhost",
|
|
port: process.env.VITE_PORT || 5173,
|
|
cors: true,
|
|
},
|
|
|
|
plugins: [
|
|
vue(),
|
|
|
|
laravel({
|
|
hotFile: "../../../public/admin-vite.hot",
|
|
publicDirectory: "../../../public",
|
|
buildDirectory: "admin/build",
|
|
input: [
|
|
"src/Resources/assets/css/app.css",
|
|
"src/Resources/assets/js/app.js",
|
|
"src/Resources/assets/js/chart.js",
|
|
"src/Resources/assets/images/logo.svg",
|
|
"src/Resources/assets/images/dark-logo.svg",
|
|
],
|
|
refresh: true,
|
|
}),
|
|
],
|
|
|
|
experimental: {
|
|
renderBuiltUrl(filename, { hostId, hostType, type }) {
|
|
if (hostType === "css") {
|
|
return path.basename(filename);
|
|
}
|
|
},
|
|
},
|
|
};
|
|
});
|