AIx-plugins-whiteboard/vite.config.js

25 lines
479 B
JavaScript
Raw Permalink Normal View History

2024-06-27 16:48:09 +08:00
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"
}
}
*/