mirror of
https://github.com/appwrite/console.git
synced 2026-04-07 19:17:46 +00:00
007f656977
* Use SvelteKit assets path placeholder for static files * Change base path conditional to ternary operator * Use logical OR operator for base path default * Set base path to /console except in preview mode * Fix base path configuration for preview environment
40 lines
917 B
JavaScript
40 lines
917 B
JavaScript
import adapter from '@sveltejs/adapter-static';
|
|
import { sveltePreprocess } from 'svelte-preprocess';
|
|
import { preprocessMeltUI, sequence } from '@melt-ui/pp';
|
|
|
|
/** @type {import('@sveltejs/kit').Config} */
|
|
const config = {
|
|
preprocess: sequence([
|
|
sveltePreprocess({
|
|
scss: {
|
|
silenceDeprecations: ['legacy-js-api']
|
|
}
|
|
}),
|
|
preprocessMeltUI()
|
|
]),
|
|
compilerOptions: {
|
|
accessors: !!process.env.VITEST
|
|
},
|
|
|
|
kit: {
|
|
alias: {
|
|
$routes: './src/routes',
|
|
$themes: './src/themes'
|
|
},
|
|
adapter: adapter({
|
|
fallback: 'index.html',
|
|
precompress: true
|
|
}),
|
|
paths: {
|
|
base: process.env.PREVIEW ? '' : '/console'
|
|
}
|
|
},
|
|
vitePlugin: {
|
|
inspector: {
|
|
toggleKeyCombo: 'meta-shift-i'
|
|
}
|
|
}
|
|
};
|
|
|
|
export default config;
|