mirror of
https://github.com/vitejs/vite.git
synced 2024-11-22 07:09:05 +00:00
16 lines
376 B
JavaScript
16 lines
376 B
JavaScript
import path from 'node:path'
|
|
import { defineConfig } from 'vite'
|
|
|
|
export default defineConfig({
|
|
build: {
|
|
lib: {
|
|
entry: path.resolve(__dirname, 'src/main2.js'),
|
|
formats: ['es', 'iife'],
|
|
name: 'message',
|
|
fileName: (format) => `dynamic-import-message.${format}.mjs`,
|
|
},
|
|
outDir: 'dist/lib',
|
|
},
|
|
cacheDir: 'node_modules/.vite-dyimport',
|
|
})
|