30 lines
691 B
TypeScript
30 lines
691 B
TypeScript
// Path: Frontend/vite.config.ts
|
|
|
|
import { nitroV2Plugin as nitro } from "@solidjs/vite-plugin-nitro-2";
|
|
import { defineConfig } from "vite";
|
|
|
|
import { solidStart } from "@solidjs/start/config";
|
|
|
|
const extraAllowedHosts = (process.env.ALLOWED_HOSTS ?? "")
|
|
.split(",")
|
|
.map((host) => host.trim())
|
|
.filter(Boolean);
|
|
|
|
export default defineConfig({
|
|
plugins: [solidStart(), nitro()],
|
|
server: {
|
|
allowedHosts: ["localhost", ...extraAllowedHosts],
|
|
},
|
|
preview: {
|
|
allowedHosts: ["localhost", ...extraAllowedHosts],
|
|
},
|
|
|
|
css: {
|
|
preprocessorOptions: {
|
|
scss: {
|
|
additionalData: `@use "/src/styles/tools/breakpoints" as *;\n@use "/src/styles/tools/mixins" as *;\n`,
|
|
},
|
|
},
|
|
},
|
|
});
|