37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import tailwindcss from '@tailwindcss/vite';
|
|
|
|
export default defineConfig({
|
|
plugins: [react(), tailwindcss()],
|
|
server: { host: '127.0.0.1', port: 4310, strictPort: true },
|
|
build: {
|
|
outDir: 'dist/web',
|
|
emptyOutDir: true,
|
|
rolldownOptions: {
|
|
output: {
|
|
codeSplitting: {
|
|
groups: [
|
|
{
|
|
name: 'react',
|
|
test: /node_modules[\\/](react|react-dom|scheduler)[\\/]/,
|
|
},
|
|
{
|
|
name: 'tiptap',
|
|
test: /node_modules[\\/](@tiptap|prosemirror-[^\\/]+|orderedmap|rope-sequence|w3c-keyname)[\\/]/,
|
|
},
|
|
{
|
|
name: 'markdown',
|
|
test: /node_modules[\\/](react-markdown|remark-[^\\/]+|rehype-[^\\/]+|unified|mdast-[^\\/]+|hast-[^\\/]+|micromark[^\\/]*|unist-[^\\/]+|vfile[^\\/]*)[\\/]/,
|
|
},
|
|
{
|
|
name: 'icons',
|
|
test: /node_modules[\\/]lucide-react[\\/]/,
|
|
},
|
|
],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
});
|