25 lines
543 B
JavaScript
25 lines
543 B
JavaScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import { resolve } from 'path';
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
build: {
|
|
lib: {
|
|
entry: resolve(__dirname, 'src/index.js'),
|
|
name: 'OslogReactBaseComponent',
|
|
fileName: 'index',
|
|
formats: ['es']
|
|
},
|
|
rollupOptions: {
|
|
external: ['react', 'react-dom'],
|
|
output: {
|
|
exports: 'named',
|
|
globals: {
|
|
react: 'React',
|
|
'react-dom': 'ReactDOM'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}); |