noteshare.space/webapp/vite.config.js
Maxime Cannoodt 4c19d53287 wip migration
2022-11-13 13:20:19 +01:00

25 lines
596 B
JavaScript

import { sveltekit } from '@sveltejs/kit/vite';
import { plugin as markdown } from 'vite-plugin-markdown';
import { searchForWorkspaceRoot } from 'vite';
/** @type {import('vite').UserConfig} */
const config = {
plugins: [sveltekit(), markdown({ mode: ['html', 'toc'] })],
optimizeDeps: {
include: ['highlight.js', 'highlight.js/lib/core']
},
test: {
globals: true,
environment: 'happy-dom',
setupFiles: ['setupTest.js']
},
server: {
fs: {
// Allow serving CHANGELOG.md file
allow: [searchForWorkspaceRoot(process.cwd()), '/CHANGELOG.md']
}
}
};
export default config;