Feat: Allowed hosts configuration
This commit is contained in:
@@ -5,13 +5,25 @@ 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/functions" as *;\n@use "/src/styles/tools/breakpoints" as *;\n@use "/src/styles/tools/mixins" as *;\n`,
|
||||
additionalData: `@use "/src/styles/tools/breakpoints" as *;\n@use "/src/styles/tools/mixins" as *;\n`,
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [solidStart(), nitro()],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user