mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2025-01-31 19:12:36 +01:00
28 lines
682 B
JavaScript
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'
|
|
}
|
|
});
|