mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Import publicRuntimeConfig from helper
This commit is contained in:
parent
f6a1dacd54
commit
8ec2e77c06
2 changed files with 14 additions and 6 deletions
|
|
@ -5,6 +5,7 @@ import tailwind from '@astrojs/tailwind'
|
||||||
// https://github.com/withastro/astro/tree/main/packages/integrations/netlify
|
// https://github.com/withastro/astro/tree/main/packages/integrations/netlify
|
||||||
import netlify from '@astrojs/netlify/functions'
|
import netlify from '@astrojs/netlify/functions'
|
||||||
|
|
||||||
|
import { makeViteDefinitions } from './helpers/public-runtime-config.mjs'
|
||||||
|
|
||||||
// https://astro.build/config
|
// https://astro.build/config
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
|
@ -19,5 +20,15 @@ export default defineConfig({
|
||||||
// https://github.com/withastro/astro/tree/main/packages/integrations/vue
|
// https://github.com/withastro/astro/tree/main/packages/integrations/vue
|
||||||
vue(),
|
vue(),
|
||||||
tailwind()
|
tailwind()
|
||||||
]
|
],
|
||||||
|
|
||||||
|
// Vite options
|
||||||
|
// https://docs.astro.build/en/reference/configuration-reference/#vite
|
||||||
|
vite: {
|
||||||
|
// Vite: https://vitejs.dev/config/#define
|
||||||
|
// esbuild: https://esbuild.github.io/api/#define
|
||||||
|
define: {
|
||||||
|
...makeViteDefinitions()
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import { promises as fs } from 'fs'
|
||||||
|
|
||||||
import pkg from './package.json'
|
import pkg from './package.json'
|
||||||
import { getSiteUrl } from '~/helpers/get-site-url.js'
|
import { getSiteUrl } from '~/helpers/get-site-url.js'
|
||||||
|
import { publicRuntimeConfig } from '~/helpers/public-runtime-config.mjs'
|
||||||
|
|
||||||
|
|
||||||
const siteUrl = getSiteUrl()
|
const siteUrl = getSiteUrl()
|
||||||
|
|
@ -10,11 +11,7 @@ const siteUrl = getSiteUrl()
|
||||||
export default {
|
export default {
|
||||||
target: 'static',
|
target: 'static',
|
||||||
|
|
||||||
publicRuntimeConfig: {
|
publicRuntimeConfig,
|
||||||
allUpdateSubscribe: process.env.ALL_UPDATE_SUBSCRIBE,
|
|
||||||
testResultStore: process.env.TEST_RESULT_STORE,
|
|
||||||
siteUrl: process.env.URL
|
|
||||||
},
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Hooks
|
** Hooks
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue