import express from 'express'; const assets = express.static(process.env.PUBLIC_FILE_UPLOAD_DIR || 'public'); const configureServer = (server) => { server.middlewares.use(assets); }; export const myVitePlugin = () => ({ name: 'my-vite-plugin', configureServer, configurePreviewServer: configureServer });