mirror of
https://github.com/danielmiessler/Fabric.git
synced 2026-02-13 23:45:08 -05:00
41 lines
975 B
TypeScript
41 lines
975 B
TypeScript
import { purgeCss } from 'vite-plugin-tailwind-purgecss';
|
|
import { sveltekit } from '@sveltejs/kit/vite';
|
|
import { defineConfig } from 'vite';
|
|
|
|
export default defineConfig({
|
|
plugins: [sveltekit(), purgeCss()],
|
|
define: {
|
|
'process.env': {
|
|
NODE_ENV: JSON.stringify(process.env.NODE_ENV)
|
|
},
|
|
'process.platform': JSON.stringify(process.platform),
|
|
'process.cwd': JSON.stringify('/'),
|
|
'process.browser': true,
|
|
'process': {
|
|
cwd: () => ('/')
|
|
}
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
process: 'process/browser'
|
|
}
|
|
},
|
|
server: {
|
|
fs: {
|
|
allow: ['..'] // allows importing from the parent directory
|
|
},
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:8080',
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/api/, '')
|
|
}
|
|
},
|
|
watch: {
|
|
usePolling: true,
|
|
interval: 100,
|
|
ignored: ['**/node_modules/**', '**/dist/**', '**/.git/**', '**/.svelte-kit/**']
|
|
}
|
|
}
|
|
});
|