36 lines
992 B
TypeScript
36 lines
992 B
TypeScript
import react from '@vitejs/plugin-react';
|
|
import { defineConfig } from 'vite';
|
|
import monkey, { cdn } from 'vite-plugin-monkey';
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [
|
|
react(),
|
|
monkey({
|
|
entry: 'src/main.tsx',
|
|
userscript: {
|
|
name: 'Session Magician',
|
|
namespace: 'https://www.imbytecat.com/',
|
|
icon: 'https://vitejs.dev/logo.svg',
|
|
version: '2.2.3',
|
|
description: 'Session Magician & Session Tools & Export/Import Sessions',
|
|
author: 'imbytecat',
|
|
match: ['*://*/*'],
|
|
grant: ['GM_registerMenuCommand', 'GM_setClipboard', 'GM_notification'],
|
|
$extra: {
|
|
grant: ['GM_cookie'],
|
|
},
|
|
},
|
|
build: {
|
|
externalGlobals: {
|
|
react: cdn.jsdelivr('React', 'umd/react.production.min.js'),
|
|
'react-dom': cdn.jsdelivr(
|
|
'ReactDOM',
|
|
'umd/react-dom.production.min.js'
|
|
),
|
|
},
|
|
},
|
|
}),
|
|
],
|
|
});
|