-
Notifications
You must be signed in to change notification settings - Fork 0
/
svelte.config.js
35 lines (33 loc) · 1.12 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
import preprocess from 'svelte-preprocess';
import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/kit/vite';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
preprocess: [
preprocess({
scss: {
// Removed to prefer individual @use in each file
// https://www.reddit.com/r/sveltejs/comments/pmham1/sveltekit_how_to_set_up_global_scss_accessible_to/hcl8lb6/
// Also this didn't seem to work in some cases
// prependData: `@use 'src/lib/styles/vars.scss';`
}
}),
vitePreprocess()
],
kit: {
appDir: process.env['RAILS_ENV'] ? '_assets' : '_app',
adapter: adapter({
fallback: process.env['RAILS_ENV'] ? 'layouts/checkin.html.erb' : 'index.html'
}),
files: {
appTemplate: process.env['RAILS_ENV'] ? 'src/checkin_rails_layout.html' : 'src/app.html'
},
paths: {
base: process.env['ROOT_PATH'] ? process.env['ROOT_PATH'] : '',
assets: process.env['PUBLIC_ASSETS_PATH'] ? process.env['PUBLIC_ASSETS_PATH'] : ''
}
},
};
export default config;