28 lines
728 B
TypeScript
28 lines
728 B
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import monkey, { cdn } from 'vite-plugin-monkey';
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [
|
|
react(),
|
|
monkey({
|
|
entry: 'src/main.tsx',
|
|
userscript: {
|
|
icon: 'https://vitejs.dev/logo.svg',
|
|
namespace: 'npm/vite-plugin-monkey',
|
|
match: ['https://boards.4channel.org/*', 'https://boards.4chan.org/*'],
|
|
},
|
|
build: {
|
|
externalGlobals: {
|
|
react: cdn.jsdelivr('React', 'umd/react.production.min.js'),
|
|
'react-dom': cdn.jsdelivr(
|
|
'ReactDOM',
|
|
'umd/react-dom.production.min.js',
|
|
),
|
|
},
|
|
},
|
|
}),
|
|
],
|
|
});
|