-
Notifications
You must be signed in to change notification settings - Fork 0
/
svelte.config.js
50 lines (47 loc) · 1.37 KB
/
svelte.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import nodeAdapter from '@sveltejs/adapter-node';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
import preprocess from 'svelte-preprocess';
import denoAdapter from 'sveltekit-adapter-deno';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
// for more information about preprocessors
preprocess: [
vitePreprocess(),
preprocess({
postcss: true
})
],
kit: {
adapter:
// Building for deno will never work as long as better-sqlite3 is broken in it
// But, let's start trying anyway
process.env.BUILD_ENV === 'deno'
? denoAdapter({
buildOptions: {
banner: {
js: `import { createRequire } from 'node:module';
import { fileURLToPath } from 'node:url';
import process from 'node:process';
import Buffer from 'node:buffer';
const require = createRequire(import.meta.url);
const __filename = fileURLToPath(import.meta.url);`
},
bundle: true
}
})
: nodeAdapter(),
alias: {
$src: './src',
$db: './src/lib/db',
tailwindConfig: 'tailwind.config.cjs'
},
paths: {
// assets: either `paths.assets`, if specified, or a relative path to `paths.base`
// has to be an absolute path
// path.resolve("./src/lib/assets") does not work
assets: ''
}
}
};
export default config;