From 64564a6fee02708d375a349d75ce49d515e66f8d Mon Sep 17 00:00:00 2001 From: schererleander Date: Wed, 25 Jun 2025 01:00:49 +0200 Subject: add markdown-based blog --- vite.config.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'vite.config.ts') 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(), + ], + }, + }, }) -- cgit v1.3.1