import { defineConfig } from 'vite' const path = require('path') // https://vitejs.dev/config/ export default defineConfig({ build: { target: 'es2015', lib: { entry: path.resolve(__dirname, './src/index.js'), formats: ['es', 'cjs'] } } }) /* "main": "./dist/tiny-whiteboard.umd.js", "module": "./dist/tiny-whiteboard.es.js", "exports": { ".": { "import": "./dist/tiny-whiteboard.es.js", "require": "./dist/tiny-whiteboard.umd.js" } } */