mirror of
https://github.com/LukeHagar/skeleton.git
synced 2025-12-06 04:21:15 +00:00
Co-authored-by: Mahmoud Zino <74062808+Mahmoud-zino@users.noreply.github.com> Co-authored-by: CokaKoala <31664583+AdrianGonz97@users.noreply.github.com> Co-authored-by: Edrich Hans Chua <edrich@xendit.co> Co-authored-by: A̴m̴r̴ ع̲مِےـرۅ <akkk33@protonmail.com> Co-authored-by: Jordan Watts <91865823+jwatts777@users.noreply.github.com> Co-authored-by: Hugo Korte <63101006+Hugos68@users.noreply.github.com> Co-authored-by: Aaron Crockett <aaron.crockett.00@gmail.com>
30 lines
718 B
TypeScript
30 lines
718 B
TypeScript
import { sveltekit } from '@sveltejs/kit/vite';
|
|
import { purgeCss } from 'vite-plugin-tailwind-purgecss';
|
|
import type { UserConfig } from 'vite';
|
|
import skeletonPluginWatcher from './vite-plugin-skeleton-plugin-watcher';
|
|
import sveld from './vite-plugin-sveld';
|
|
|
|
// Import package.json version
|
|
import { readFileSync } from 'fs';
|
|
const json = readFileSync('../../packages/skeleton/package.json', 'utf8');
|
|
const pkg = JSON.parse(json);
|
|
|
|
const config: UserConfig = {
|
|
plugins: [
|
|
sveltekit(),
|
|
sveld(),
|
|
skeletonPluginWatcher(),
|
|
purgeCss({
|
|
safelist: {
|
|
// any selectors that begin with "hljs-" will not be purged
|
|
greedy: [/^hljs-/]
|
|
}
|
|
})
|
|
],
|
|
define: {
|
|
__PACKAGE__: pkg
|
|
}
|
|
};
|
|
|
|
export default config;
|