noteshare.space/webapp/svelte.config.js

39 lines
915 B
JavaScript
Raw Normal View History

2022-06-30 23:08:52 +03:00
// import adapter from '@sveltejs/adapter-auto';
import adapter from '@sveltejs/adapter-node';
2022-06-22 00:30:11 +03:00
import preprocess from 'svelte-preprocess';
2022-08-06 21:48:43 +03:00
import { plugin as markdown } from 'vite-plugin-markdown';
import { searchForWorkspaceRoot } from 'vite';
2022-06-22 00:30:11 +03:00
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
preprocess: [
preprocess({
postcss: true
})
],
kit: {
2022-07-04 23:08:13 +03:00
adapter: adapter(),
vite: {
2022-08-06 21:48:43 +03:00
optimizeDeps: {
include: ['highlight.js', 'highlight.js/lib/core']
},
plugins: [markdown({ mode: ['html', 'toc'] })],
2022-07-04 23:08:13 +03:00
test: {
2022-07-05 00:52:54 +03:00
globals: true,
environment: 'happy-dom',
setupFiles: ['setupTest.js']
2022-08-06 21:48:43 +03:00
},
server: {
fs: {
// Allow serving CHANGELOG.md file
allow: [searchForWorkspaceRoot(process.cwd()), '/CHANGELOG.md']
}
2022-07-04 23:08:13 +03:00
}
}
2022-06-22 00:30:11 +03:00
}
};
export default config;