Genesis
This commit is contained in:
24
vite.config.lib.js
Normal file
24
vite.config.lib.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import { resolve } from 'path';
|
||||
import { defineConfig } from 'vite';
|
||||
|
||||
export default defineConfig({
|
||||
build: {
|
||||
outDir: 'dist',
|
||||
emptyOutDir: false,
|
||||
lib: {
|
||||
entry: resolve(import.meta.dirname, 'src/lib/index.js'),
|
||||
name: 'Automat',
|
||||
fileName: (format) => `automat.${format}.js`,
|
||||
formats: ['es', 'umd'],
|
||||
},
|
||||
rollupOptions: {
|
||||
external: ['react', 'react-dom'],
|
||||
output: {
|
||||
globals: {
|
||||
react: 'React',
|
||||
'react-dom': 'ReactDOM',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user