noteshare.space/webapp/vite.config.js

25 lines
596 B
JavaScript
Raw Normal View History

2022-11-13 15:20:19 +03:00
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;