diff --git a/astro.config.mjs b/astro.config.mjs index 757ddb0..e4b3d25 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -4,8 +4,22 @@ const SERVER_PORT = 3000; const LOCALHOST_URL = `http://localhost:${SERVER_PORT}`; const LIVE_URL = "https://Jhonlz09.github.io.git"; +const SCRIPT = process.env.npm_lifecycle_script || ""; +const isBuild = SCRIPT.includes("astro build"); + +let BASE_URL = LOCALHOST_URL; + +if(isBuild){ + BASE_URL = LIVE_URL; +} // https://astro.build/config export default defineConfig({ - site: 'https://Jhonlz09.github.io.git' + server : {port: SERVER_PORT}, + site: BASE_URL, + integrations:[ + tailwind({ + config: {applyBasesStyles: false} + }) + ] });