Newer
Older
import { mdsvex } from 'mdsvex';
import mdsvexConfig from './mdsvex.config.js';
import preprocess from 'svelte-preprocess';
Chris Dawson
committed
import adapter from '@sveltejs/adapter-static';
import { liquidPreprocessor, svekyllImagePreprocessor } from './src/svekyll/svekyll.js';
import fs from 'fs';
import yaml from 'js-yaml';
const file = fs.readFileSync('_config.yml', 'utf8');
const doc = yaml.load(file);
// console.log('File is: ', file);
process.env.VITE_JEKYLL_CONFIG = JSON.stringify(doc);
console.log(
'Unable to process _config.yml, skipping (you may not have a _config.yml and that is fine)'
);
/** @type {import('@sveltejs/kit').Config} */
const config = {
extensions: ['.svelte', ...mdsvexConfig.extensions],
kit: {
vite: {
resolve: {
alias: {
$svekyll: resolve('./src/svekyll')
}
}
}
liquidPreprocessor(),
preprocess({
postcss: true
}),
mdsvex(mdsvexConfig)
]