nitro-renderer/vite.config.js
2025-01-21 14:11:47 -05:00

28 lines
682 B
JavaScript

// vite.config.js
import typescript from '@rollup/plugin-typescript';
import { resolve } from 'path';
import { defineConfig } from 'vite';
export default defineConfig({
plugins: [
typescript({
'target': 'es6',
'rootDir': './src',
'declaration': true,
exclude: './node_modules/**',
allowSyntheticDefaultImports: true
})
],
build: {
lib: {
entry: resolve('./src/index.ts'),
name: 'nitro-renderer',
formats: ['es', 'cjs'],
fileName: format => `nitro-renderer.${format}.js`
}
},
server: {
host: '127.0.0.1'
}
});