File tree Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -28,9 +28,7 @@ yarn add vite-userscript-plugin -D
2828pnpm add vite-userscript-plugin -D
2929```
3030
31- ## Usage
32-
33- ### ` vite.config.ts `
31+ ### Setup ` vite.config.ts `
3432
3533``` js
3634import { defineConfig } from ' vite'
@@ -45,21 +43,21 @@ export default defineConfig((config) => {
4543 header: {
4644 name,
4745 version,
48- match: [
49- ' *://example.com' ,
50- ' *://example.org' ,
51- ' *://example.edu'
52- ]
46+ match: ' *://example.com'
47+ },
48+ server: {
49+ port: 3000
5350 }
5451 })
5552 ]
5653 }
5754})
5855```
5956
60- ### ` package.json `
57+ ### Setup scripts
6158
6259``` json
60+ // package.json
6361{
6462 "scripts" : {
6563 "dev" : " vite build --watch --mode development" ,
@@ -68,15 +66,14 @@ export default defineConfig((config) => {
6866}
6967```
7068
71- ### ` tsconfig.json `
69+ ### Setup TypeScript
7270
7371``` json
72+ // tsconfig.json
7473{
7574 "compilerOptions" : {
7675 "types" : [
77- " vite-userscript-plugin/types/tampermonkey" ,
78- // "vite-userscript-plugin/types/greasemonkey",
79- // "vite-userscript-plugin/types/violentmonkey"
76+ " vite-userscript-plugin/types/tampermonkey"
8077 ]
8178 }
8279}
You can’t perform that action at this time.
0 commit comments