|
import { fileURLToPath, URL } from 'node:url' |
|
import { resolve } from 'path' |
|
import { defineConfig } from 'vite' |
|
import vue from '@vitejs/plugin-vue' |
|
|
|
|
|
export default defineConfig({ |
|
define: { |
|
'process.env.NODE_ENV': '"production"', |
|
}, |
|
plugins: [vue()], |
|
resolve: { |
|
alias: { |
|
'@': fileURLToPath(new URL('./src', import.meta.url)) |
|
} |
|
}, |
|
build: { |
|
|
|
|
|
minify: true, |
|
sourcemap: true, |
|
watch: { |
|
|
|
}, |
|
lib: { |
|
entry: resolve(__dirname, 'src/main.js'), |
|
name: 'sd-webui-prompt-all-in-one', |
|
formats: ['umd'], |
|
}, |
|
rollupOptions: { |
|
plugins: [ |
|
], |
|
output: { |
|
globals: { |
|
}, |
|
name: "sdWebuiPromptAllInOne", |
|
dir: '../', |
|
format: 'umd', |
|
chunkFileNames: 'javascript/[name].chunk.js', |
|
entryFileNames: 'javascript/[name].entry.js', |
|
assetFileNames: 'style.[ext]' |
|
}, |
|
}, |
|
} |
|
}) |
|
|