37 lines
980 B
TypeScript
37 lines
980 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: 'Cookie Magician',
|
|
namespace: 'https://www.imbytecat.com/',
|
|
icon: 'https://vitejs.dev/logo.svg',
|
|
version: '3.1.2',
|
|
description: 'Cookie Magician & Cookie Tools & Export/Import Cookies',
|
|
author: 'imbytecat',
|
|
match: ['*://*/*'],
|
|
grant: ['GM_setClipboard'],
|
|
license: 'GPL-3.0-or-later',
|
|
$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'
|
|
),
|
|
},
|
|
},
|
|
}),
|
|
],
|
|
});
|