2025/04/05

Initial base

Signed-off-by: Drunkoatmeal <no@thanks.com>
This commit is contained in:
Drunkoatmeal
2025-04-05 01:32:22 +07:00
parent bd52d178bc
commit 80ddc9133c
5 changed files with 214 additions and 54 deletions

View File

@ -3,7 +3,13 @@ import Userscript from 'vite-userscript-plugin'
import { name, description, version } from './package.json';
// https://vite.dev/config/
export default defineConfig({
export default defineConfig( ({mode}) => {
return {
esbuild: {
pure: mode === 'prod' ? ['console.debug'] : [],
drop: mode === 'prod' ? ['console'] : []
},
plugins: [
Userscript({
entry: 'src/main.ts',
@ -14,12 +20,13 @@ export default defineConfig({
namespace: 'noproompter',
match: 'https://www.pixiv.net/*/tags/*',
noframes:true,
"run-at": "document-end",
"run-at": "document-start",
grant: ['GM.setValue', 'GM.addStyle', 'GM.getValue', 'GM.addElement']
},
server: {
port: 3000
}
})
],
]
}
})