diff options
| author | schererleander <leander@schererleander.de> | 2025-06-25 01:00:49 +0200 |
|---|---|---|
| committer | schererleander <leander@schererleander.de> | 2025-06-25 01:00:59 +0200 |
| commit | 64564a6fee02708d375a349d75ce49d515e66f8d (patch) | |
| tree | fa7685e6f51e90af9f8bd45fae1f2133b1237772 /vite.config.ts | |
| parent | 12aa0baac380149cdbb36803605be42368e736ad (diff) | |
add markdown-based blog
Diffstat (limited to 'vite.config.ts')
| -rw-r--r-- | vite.config.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/vite.config.ts b/vite.config.ts index 33064ec..5282e0c 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -2,6 +2,8 @@ import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' import tailwindcss from '@tailwindcss/vite' import Sitemap from 'vite-plugin-sitemap'; +import { NodeGlobalsPolyfillPlugin } from "@esbuild-plugins/node-globals-polyfill"; +import { NodeModulesPolyfillPlugin } from "@esbuild-plugins/node-modules-polyfill"; export default defineConfig({ plugins: [ @@ -12,4 +14,21 @@ export default defineConfig({ dynamicRoutes: [ "/", "/gear", "/projects", "/homelab", "/printing" ] }) ], + resolve: { + alias: { + buffer: "buffer", + process: "process/browser", + }, + }, + optimizeDeps: { + esbuildOptions: { + plugins: [ + NodeGlobalsPolyfillPlugin({ + buffer: true, + process: true, + }), + NodeModulesPolyfillPlugin(), + ], + }, + }, }) |
