import { fileURLToPath, URL } from 'node:url' import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import { nodePolyfills } from 'vite-plugin-node-polyfills' import fs from 'fs-extra' //import { viteSingleFile } from "vite-plugin-singlefile" export default defineConfig({ worker: { format: 'es', }, build: { lib: { entry: './src/main.js', name: 'my-library', format: 'es', }, //..