Skip to content

Instantly share code, notes, and snippets.

@jedfoster
Created February 4, 2022 23:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jedfoster/c5c530588a7115216e96d5dbd3329504 to your computer and use it in GitHub Desktop.
Save jedfoster/c5c530588a7115216e96d5dbd3329504 to your computer and use it in GitHub Desktop.
import * as path from 'path';
import adapter from '@sveltejs/adapter-auto';
import { markdown } from 'svelte-preprocess-markdown';
const API_BASE = process.env.DEV ? 'http://127.0.0.1:3000' : 'https://api.svelte.dev';
const config = {
kit: {
adapter: adapter(),
vite: () => ({
define: {
'process.env.API_BASE': JSON.stringify(API_BASE),
},
resolve: {
alias: {
$img: path.resolve('src/images'),
$lib: path.resolve('./src/lib'),
},
},
server: {
fs: {
strict: false,
},
},
}),
// hydrate the <div id="svelte"> element in src/app.html
target: '#svelte',
},
extensions: ['.svelte', '.md'],
preprocess: [
markdown(),
],
};
export default config;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment