add: full multi-tenancy control
This commit is contained in:
46
packages/Webkul/Installer/vite.config.js
Normal file
46
packages/Webkul/Installer/vite.config.js
Normal file
@@ -0,0 +1,46 @@
|
||||
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,
|
||||
},
|
||||
|
||||
plugins: [
|
||||
vue(),
|
||||
|
||||
laravel({
|
||||
hotFile: "../../../public/installer-vite.hot",
|
||||
publicDirectory: "../../../public",
|
||||
buildDirectory: "installer/build",
|
||||
input: [
|
||||
"src/Resources/assets/css/app.css",
|
||||
"src/Resources/assets/js/app.js",
|
||||
],
|
||||
refresh: true,
|
||||
}),
|
||||
],
|
||||
|
||||
experimental: {
|
||||
renderBuiltUrl(filename, { hostId, hostType, type }) {
|
||||
if (hostType === "css") {
|
||||
return path.basename(filename);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user