mirror of
https://github.com/fergalmoran/turnstone.git
synced 2025-12-22 09:49:56 +00:00
32 lines
735 B
JavaScript
32 lines
735 B
JavaScript
import path from 'path'
|
|
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
build: {
|
|
lib: {
|
|
entry: path.resolve(__dirname, 'src/lib/index.jsx'),
|
|
name: 'turnstone',
|
|
fileName: (format) => `turnstone.${format}.js`
|
|
},
|
|
rollupOptions: {
|
|
// make sure to externalize deps that shouldn't be bundled
|
|
// into your library
|
|
external: ['react', 'react-dom'],
|
|
output: {
|
|
// Provide global variables to use in the UMD build
|
|
// for externalized deps
|
|
globals: {
|
|
react: 'React'
|
|
}
|
|
}
|
|
}
|
|
},
|
|
plugins: [react()],
|
|
server: {
|
|
port: 3005,
|
|
open: true
|
|
}
|
|
})
|