mirror of
https://github.com/Floriansylvain/creative_coding_1.git
synced 2026-08-19 11:43:20 +02:00
Initial commit
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { defineConfig } from "vite"
|
||||
|
||||
const isCodeSandbox = "SANDBOX_URL" in process.env || "CODESANDBOX_HOST" in process.env
|
||||
|
||||
export default defineConfig(({ command }) => {
|
||||
const baseUrl =
|
||||
command === "serve" ? "https://projet.floriansylvain.fr/Creative_Coding" : ""
|
||||
|
||||
return {
|
||||
define: {
|
||||
BASE_URL: JSON.stringify(baseUrl),
|
||||
},
|
||||
root: "src/",
|
||||
publicDir: "../static/",
|
||||
base: "/Creative_Coding/",
|
||||
server: {
|
||||
host: true,
|
||||
open: !isCodeSandbox, // Open if it's not a CodeSandbox
|
||||
},
|
||||
build: {
|
||||
outDir: "../dist",
|
||||
emptyOutDir: true,
|
||||
},
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user