mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-18 15:55:05 +00:00
* Replace cloudflare export condition with workerd * Add note about Cloudflare Vite plugin
21 lines
415 B
JavaScript
21 lines
415 B
JavaScript
import { defineConfig } from 'vite'
|
|
import commonjs from '@rollup/plugin-commonjs'
|
|
|
|
export default defineConfig({
|
|
build: {
|
|
emptyOutDir: false,
|
|
lib: {
|
|
entry: './src/index.mjs',
|
|
fileName: 'vite-cloudflare',
|
|
formats: ['es'],
|
|
},
|
|
rollupOptions: {
|
|
external: ['cloudflare:sockets'],
|
|
},
|
|
},
|
|
resolve: {
|
|
conditions: ['import', 'workerd'],
|
|
},
|
|
plugins: [commonjs()],
|
|
})
|