mirror of
https://github.com/pionxzh/chatgpt-exporter.git
synced 2026-07-23 09:00:51 -05:00
39 lines
1.2 KiB
TypeScript
39 lines
1.2 KiB
TypeScript
import { defineConfig } from 'vite'
|
|
import monkey from 'vite-plugin-monkey'
|
|
import preact from '@preact/preset-vite'
|
|
import packageJson from './package.json'
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
// https://github.com/lisonge/vite-plugin-monkey/issues/10#issuecomment-1207264978
|
|
esbuild: {
|
|
charset: 'utf8',
|
|
},
|
|
plugins: [
|
|
preact({
|
|
devToolsEnabled: false,
|
|
devtoolsInProd: false,
|
|
}),
|
|
monkey({
|
|
entry: 'src/main.tsx',
|
|
userscript: {
|
|
'name': packageJson.title,
|
|
'author': packageJson.author,
|
|
'namespace': packageJson.author,
|
|
'description': packageJson.description,
|
|
'license': packageJson.license,
|
|
'match': ['https://chat.openai.com/chat', 'https://chat.openai.com/chat/*'],
|
|
'icon': 'https://chat.openai.com/favicon.ico',
|
|
'run-at': 'document-end',
|
|
},
|
|
build: {
|
|
fileName: 'chatgpt.user.js',
|
|
minifyCss: false,
|
|
},
|
|
server: {
|
|
open: true,
|
|
},
|
|
}),
|
|
],
|
|
})
|