add vite build for remote

This commit is contained in:
jeffvli 2025-05-24 00:04:41 -07:00
parent 74554d9725
commit 48917547b2
7 changed files with 129 additions and 196 deletions

View file

@ -5,12 +5,8 @@ electronVersion: 35.1.5
directories:
buildResources: assets
files:
- '!**/.vscode/*'
- '!src/*'
- '!electron.vite.config.{js,ts,mjs,cjs}'
- '!{.eslintcache,eslint.config.mjs,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}'
- '!{.env,.env.*,.npmrc,pnpm-lock.yaml}'
- '!{tsconfig.json,tsconfig.node.json,tsconfig.web.json}'
- 'out/**/*'
- 'package.json'
extraResources:
- assets/**
asarUnpack:

View file

@ -20,7 +20,9 @@
},
"main": "./out/main/index.js",
"scripts": {
"build": "pnpm run typecheck && electron-vite build",
"build": "pnpm run typecheck && pnpm run build:app && pnpm run build:remote",
"build:app": "electron-vite build",
"build:remote": "vite build --config remote.vite.config.ts",
"dev": "electron-vite dev",
"dev:watch": "electron-vite dev --watch",
"format": "prettier --write .",
@ -130,8 +132,6 @@
"@types/source-map-support": "^0.5.10",
"@types/styled-components": "^5.1.26",
"@types/ws": "^8.18.1",
"@typescript-eslint/eslint-plugin": "^5.47.0",
"@typescript-eslint/parser": "^5.47.0",
"@vitejs/plugin-react": "^4.3.4",
"concurrently": "^7.1.0",
"cross-env": "^7.0.3",
@ -162,7 +162,8 @@
"typescript-plugin-styled-components": "^3.0.0",
"vite": "^6.3.5",
"vite-plugin-conditional-import": "^0.1.7",
"vite-plugin-dynamic-import": "^1.6.0"
"vite-plugin-dynamic-import": "^1.6.0",
"vite-plugin-ejs": "^1.7.0"
},
"productName": "feishin"
}

212
pnpm-lock.yaml generated
View file

@ -252,15 +252,9 @@ importers:
'@types/ws':
specifier: ^8.18.1
version: 8.18.1
'@typescript-eslint/eslint-plugin':
specifier: ^5.47.0
version: 5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.27.0)(typescript@5.8.3))(eslint@9.27.0)(typescript@5.8.3)
'@typescript-eslint/parser':
specifier: ^5.47.0
version: 5.62.0(eslint@9.27.0)(typescript@5.8.3)
'@vitejs/plugin-react':
specifier: ^4.3.4
version: 4.5.0(vite@6.3.5(@types/node@22.15.21)(sass-embedded@1.89.0))
version: 4.5.0(vite@6.3.5(@types/node@22.15.21)(sass-embedded@1.89.0)(terser@5.39.2))
concurrently:
specifier: ^7.1.0
version: 7.6.0
@ -278,7 +272,7 @@ importers:
version: 3.2.1
electron-vite:
specifier: ^3.1.0
version: 3.1.0(vite@6.3.5(@types/node@22.15.21)(sass-embedded@1.89.0))
version: 3.1.0(vite@6.3.5(@types/node@22.15.21)(sass-embedded@1.89.0)(terser@5.39.2))
eslint:
specifier: ^9.24.0
version: 9.27.0
@ -344,13 +338,16 @@ importers:
version: 3.0.0(typescript@5.8.3)
vite:
specifier: ^6.3.5
version: 6.3.5(@types/node@22.15.21)(sass-embedded@1.89.0)
version: 6.3.5(@types/node@22.15.21)(sass-embedded@1.89.0)(terser@5.39.2)
vite-plugin-conditional-import:
specifier: ^0.1.7
version: 0.1.7
vite-plugin-dynamic-import:
specifier: ^1.6.0
version: 1.6.0
vite-plugin-ejs:
specifier: ^1.7.0
version: 1.7.0(vite@6.3.5(@types/node@22.15.21)(sass-embedded@1.89.0)(terser@5.39.2))
packages:
@ -890,6 +887,9 @@ packages:
resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==}
engines: {node: '>=6.0.0'}
'@jridgewell/source-map@0.3.6':
resolution: {integrity: sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==}
'@jridgewell/sourcemap-codec@1.5.0':
resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==}
@ -1364,9 +1364,6 @@ packages:
'@types/responselike@1.0.3':
resolution: {integrity: sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==}
'@types/semver@7.7.0':
resolution: {integrity: sha512-k107IF4+Xr7UHjwDc7Cfd6PRQfbdkiRabXGRjo07b4WyPahFBZCZ1sE+BNxYIJPPg73UkfOsVOLwqVc/6ETrIA==}
'@types/source-map-support@0.5.10':
resolution: {integrity: sha512-tgVP2H469x9zq34Z0m/fgPewGhg/MLClalNOiPIzQlXrSS2YrKu/xCdSCKnEDwkFha51VKEKB6A9wW26/ZNwzA==}
@ -1391,17 +1388,6 @@ packages:
'@types/yauzl@2.10.3':
resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==}
'@typescript-eslint/eslint-plugin@5.62.0':
resolution: {integrity: sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
'@typescript-eslint/parser': ^5.0.0
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
'@typescript-eslint/eslint-plugin@8.32.1':
resolution: {integrity: sha512-6u6Plg9nP/J1GRpe/vcjjabo6Uc5YQPAMxsgQyGC/I0RuukiG1wIe3+Vtg3IrSCVJDmqK3j8adrtzXSENRtFgg==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@ -1410,16 +1396,6 @@ packages:
eslint: ^8.57.0 || ^9.0.0
typescript: '>=4.8.4 <5.9.0'
'@typescript-eslint/parser@5.62.0':
resolution: {integrity: sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
'@typescript-eslint/parser@8.32.1':
resolution: {integrity: sha512-LKMrmwCPoLhM45Z00O1ulb6jwyVr2kr3XJp+G+tSEZcbauNnScewcQwtJqXDhXeYPDEjZ8C1SjXm015CirEmGg==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@ -1427,24 +1403,10 @@ packages:
eslint: ^8.57.0 || ^9.0.0
typescript: '>=4.8.4 <5.9.0'
'@typescript-eslint/scope-manager@5.62.0':
resolution: {integrity: sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
'@typescript-eslint/scope-manager@8.32.1':
resolution: {integrity: sha512-7IsIaIDeZn7kffk7qXC3o6Z4UblZJKV3UBpkvRNpr5NSyLji7tvTcvmnMNYuYLyh26mN8W723xpo3i4MlD33vA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@typescript-eslint/type-utils@5.62.0':
resolution: {integrity: sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: '*'
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
'@typescript-eslint/type-utils@8.32.1':
resolution: {integrity: sha512-mv9YpQGA8iIsl5KyUPi+FGLm7+bA4fgXaeRcFKRDRwDMu4iwrSHeDPipwueNXhdIIZltwCJv+NkxftECbIZWfA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@ -1475,12 +1437,6 @@ packages:
peerDependencies:
typescript: '>=4.8.4 <5.9.0'
'@typescript-eslint/utils@5.62.0':
resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
'@typescript-eslint/utils@8.32.1':
resolution: {integrity: sha512-DsSFNIgLSrc89gpq1LJB7Hm1YpuhK086DRDJSNrewcGvYloWW1vZLHBTIvarKZDcAORIy/uWNx8Gad+4oMpkSA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@ -1917,6 +1873,9 @@ packages:
resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==}
engines: {node: '>=18'}
commander@2.20.3:
resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==}
commander@5.1.0:
resolution: {integrity: sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==}
engines: {node: '>= 6'}
@ -2402,10 +2361,6 @@ packages:
peerDependencies:
eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7
eslint-scope@5.1.1:
resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==}
engines: {node: '>=8.0.0'}
eslint-scope@8.3.0:
resolution: {integrity: sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@ -2440,10 +2395,6 @@ packages:
resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==}
engines: {node: '>=4.0'}
estraverse@4.3.0:
resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==}
engines: {node: '>=4.0'}
estraverse@5.3.0:
resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==}
engines: {node: '>=4.0'}
@ -3472,9 +3423,6 @@ packages:
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
hasBin: true
natural-compare-lite@1.4.0:
resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==}
natural-compare@1.4.0:
resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}
@ -4639,6 +4587,11 @@ packages:
resolution: {integrity: sha512-yYrrsWnrXMcdsnu/7YMYAofM1ktpL5By7vZhf15CrXijWWrEYZks5AXBudalfSWJLlnen/QUJUB5aoB0kqZUGA==}
engines: {node: '>=6.0.0'}
terser@5.39.2:
resolution: {integrity: sha512-yEPUmWve+VA78bI71BW70Dh0TuV4HHd+I5SHOAfS1+QBOmvmCiiffgjR8ryyEd3KIfvPGFqoADt8LdQ6XpXIvg==}
engines: {node: '>=10'}
hasBin: true
text-decoder@1.2.3:
resolution: {integrity: sha512-3/o9z3X0X0fTupwsYvR03pJ/DjWuqqrfwBgTQzdWDiQSm9KitAyz/9WqsT2JQW7KV2m+bC2ol/zqpW37NHxLaA==}
@ -4899,6 +4852,11 @@ packages:
vite-plugin-dynamic-import@1.6.0:
resolution: {integrity: sha512-TM0sz70wfzTIo9YCxVFwS8OA9lNREsh+0vMHGSkWDTZ7bgd1Yjs5RV8EgB634l/91IsXJReg0xtmuQqP0mf+rg==}
vite-plugin-ejs@1.7.0:
resolution: {integrity: sha512-JNP3zQDC4mSbfoJ3G73s5mmZITD8NGjUmLkq4swxyahy/W0xuokK9U9IJGXw7KCggq6UucT6hJ0p+tQrNtqTZw==}
peerDependencies:
vite: '>=5.0.0'
vite@6.3.5:
resolution: {integrity: sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==}
engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0}
@ -5663,6 +5621,12 @@ snapshots:
'@jridgewell/set-array@1.2.1': {}
'@jridgewell/source-map@0.3.6':
dependencies:
'@jridgewell/gen-mapping': 0.3.8
'@jridgewell/trace-mapping': 0.3.25
optional: true
'@jridgewell/sourcemap-codec@1.5.0': {}
'@jridgewell/trace-mapping@0.3.25':
@ -6154,8 +6118,6 @@ snapshots:
dependencies:
'@types/node': 22.15.21
'@types/semver@7.7.0': {}
'@types/source-map-support@0.5.10':
dependencies:
source-map: 0.6.1
@ -6185,25 +6147,6 @@ snapshots:
'@types/node': 22.15.21
optional: true
'@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.27.0)(typescript@5.8.3))(eslint@9.27.0)(typescript@5.8.3)':
dependencies:
'@eslint-community/regexpp': 4.12.1
'@typescript-eslint/parser': 5.62.0(eslint@9.27.0)(typescript@5.8.3)
'@typescript-eslint/scope-manager': 5.62.0
'@typescript-eslint/type-utils': 5.62.0(eslint@9.27.0)(typescript@5.8.3)
'@typescript-eslint/utils': 5.62.0(eslint@9.27.0)(typescript@5.8.3)
debug: 4.4.1
eslint: 9.27.0
graphemer: 1.4.0
ignore: 5.3.2
natural-compare-lite: 1.4.0
semver: 7.7.2
tsutils: 3.21.0(typescript@5.8.3)
optionalDependencies:
typescript: 5.8.3
transitivePeerDependencies:
- supports-color
'@typescript-eslint/eslint-plugin@8.32.1(@typescript-eslint/parser@8.32.1(eslint@9.27.0)(typescript@5.8.3))(eslint@9.27.0)(typescript@5.8.3)':
dependencies:
'@eslint-community/regexpp': 4.12.1
@ -6221,18 +6164,6 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@typescript-eslint/parser@5.62.0(eslint@9.27.0)(typescript@5.8.3)':
dependencies:
'@typescript-eslint/scope-manager': 5.62.0
'@typescript-eslint/types': 5.62.0
'@typescript-eslint/typescript-estree': 5.62.0(typescript@5.8.3)
debug: 4.4.1
eslint: 9.27.0
optionalDependencies:
typescript: 5.8.3
transitivePeerDependencies:
- supports-color
'@typescript-eslint/parser@8.32.1(eslint@9.27.0)(typescript@5.8.3)':
dependencies:
'@typescript-eslint/scope-manager': 8.32.1
@ -6245,28 +6176,11 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@typescript-eslint/scope-manager@5.62.0':
dependencies:
'@typescript-eslint/types': 5.62.0
'@typescript-eslint/visitor-keys': 5.62.0
'@typescript-eslint/scope-manager@8.32.1':
dependencies:
'@typescript-eslint/types': 8.32.1
'@typescript-eslint/visitor-keys': 8.32.1
'@typescript-eslint/type-utils@5.62.0(eslint@9.27.0)(typescript@5.8.3)':
dependencies:
'@typescript-eslint/typescript-estree': 5.62.0(typescript@5.8.3)
'@typescript-eslint/utils': 5.62.0(eslint@9.27.0)(typescript@5.8.3)
debug: 4.4.1
eslint: 9.27.0
tsutils: 3.21.0(typescript@5.8.3)
optionalDependencies:
typescript: 5.8.3
transitivePeerDependencies:
- supports-color
'@typescript-eslint/type-utils@8.32.1(eslint@9.27.0)(typescript@5.8.3)':
dependencies:
'@typescript-eslint/typescript-estree': 8.32.1(typescript@5.8.3)
@ -6296,20 +6210,6 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@typescript-eslint/typescript-estree@5.62.0(typescript@5.8.3)':
dependencies:
'@typescript-eslint/types': 5.62.0
'@typescript-eslint/visitor-keys': 5.62.0
debug: 4.4.1
globby: 11.1.0
is-glob: 4.0.3
semver: 7.7.2
tsutils: 3.21.0(typescript@5.8.3)
optionalDependencies:
typescript: 5.8.3
transitivePeerDependencies:
- supports-color
'@typescript-eslint/typescript-estree@8.32.1(typescript@5.8.3)':
dependencies:
'@typescript-eslint/types': 8.32.1
@ -6324,21 +6224,6 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@typescript-eslint/utils@5.62.0(eslint@9.27.0)(typescript@5.8.3)':
dependencies:
'@eslint-community/eslint-utils': 4.7.0(eslint@9.27.0)
'@types/json-schema': 7.0.15
'@types/semver': 7.7.0
'@typescript-eslint/scope-manager': 5.62.0
'@typescript-eslint/types': 5.62.0
'@typescript-eslint/typescript-estree': 5.62.0(typescript@5.8.3)
eslint: 9.27.0
eslint-scope: 5.1.1
semver: 7.7.2
transitivePeerDependencies:
- supports-color
- typescript
'@typescript-eslint/utils@8.32.1(eslint@9.27.0)(typescript@5.8.3)':
dependencies:
'@eslint-community/eslint-utils': 4.7.0(eslint@9.27.0)
@ -6360,7 +6245,7 @@ snapshots:
'@typescript-eslint/types': 8.32.1
eslint-visitor-keys: 4.2.0
'@vitejs/plugin-react@4.5.0(vite@6.3.5(@types/node@22.15.21)(sass-embedded@1.89.0))':
'@vitejs/plugin-react@4.5.0(vite@6.3.5(@types/node@22.15.21)(sass-embedded@1.89.0)(terser@5.39.2))':
dependencies:
'@babel/core': 7.27.1
'@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.27.1)
@ -6368,7 +6253,7 @@ snapshots:
'@rolldown/pluginutils': 1.0.0-beta.9
'@types/babel__core': 7.20.5
react-refresh: 0.17.0
vite: 6.3.5(@types/node@22.15.21)(sass-embedded@1.89.0)
vite: 6.3.5(@types/node@22.15.21)(sass-embedded@1.89.0)(terser@5.39.2)
transitivePeerDependencies:
- supports-color
@ -6890,6 +6775,9 @@ snapshots:
commander@12.1.0: {}
commander@2.20.3:
optional: true
commander@5.1.0: {}
commander@9.5.0:
@ -7305,7 +7193,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
electron-vite@3.1.0(vite@6.3.5(@types/node@22.15.21)(sass-embedded@1.89.0)):
electron-vite@3.1.0(vite@6.3.5(@types/node@22.15.21)(sass-embedded@1.89.0)(terser@5.39.2)):
dependencies:
'@babel/core': 7.27.1
'@babel/plugin-transform-arrow-functions': 7.27.1(@babel/core@7.27.1)
@ -7313,7 +7201,7 @@ snapshots:
esbuild: 0.25.4
magic-string: 0.30.17
picocolors: 1.1.1
vite: 6.3.5(@types/node@22.15.21)(sass-embedded@1.89.0)
vite: 6.3.5(@types/node@22.15.21)(sass-embedded@1.89.0)(terser@5.39.2)
transitivePeerDependencies:
- supports-color
@ -7561,11 +7449,6 @@ snapshots:
string.prototype.matchall: 4.0.12
string.prototype.repeat: 1.0.0
eslint-scope@5.1.1:
dependencies:
esrecurse: 4.3.0
estraverse: 4.3.0
eslint-scope@8.3.0:
dependencies:
esrecurse: 4.3.0
@ -7629,8 +7512,6 @@ snapshots:
dependencies:
estraverse: 5.3.0
estraverse@4.3.0: {}
estraverse@5.3.0: {}
estree-walker@2.0.2: {}
@ -8696,8 +8577,6 @@ snapshots:
nanoid@3.3.11: {}
natural-compare-lite@1.4.0: {}
natural-compare@1.4.0: {}
natural-orderby@5.0.0: {}
@ -9950,6 +9829,14 @@ snapshots:
mkdirp: 0.5.6
rimraf: 2.6.3
terser@5.39.2:
dependencies:
'@jridgewell/source-map': 0.3.6
acorn: 8.14.1
commander: 2.20.3
source-map-support: 0.5.21
optional: true
text-decoder@1.2.3:
dependencies:
b4a: 1.6.7
@ -10009,11 +9896,6 @@ snapshots:
tslib: 1.14.1
typescript: 5.1.6
tsutils@3.21.0(typescript@5.8.3):
dependencies:
tslib: 1.14.1
typescript: 5.8.3
type-check@0.4.0:
dependencies:
prelude-ls: 1.2.1
@ -10231,7 +10113,12 @@ snapshots:
fast-glob: 3.3.3
magic-string: 0.30.17
vite@6.3.5(@types/node@22.15.21)(sass-embedded@1.89.0):
vite-plugin-ejs@1.7.0(vite@6.3.5(@types/node@22.15.21)(sass-embedded@1.89.0)(terser@5.39.2)):
dependencies:
ejs: 3.1.10
vite: 6.3.5(@types/node@22.15.21)(sass-embedded@1.89.0)(terser@5.39.2)
vite@6.3.5(@types/node@22.15.21)(sass-embedded@1.89.0)(terser@5.39.2):
dependencies:
esbuild: 0.25.4
fdir: 6.4.4(picomatch@4.0.2)
@ -10243,6 +10130,7 @@ snapshots:
'@types/node': 22.15.21
fsevents: 2.3.3
sass-embedded: 1.89.0
terser: 5.39.2
void-elements@3.1.0: {}

44
remote.vite.config.ts Normal file
View file

@ -0,0 +1,44 @@
import react from '@vitejs/plugin-react';
import path from 'path';
import { defineConfig, normalizePath } from 'vite';
import { ViteEjsPlugin } from 'vite-plugin-ejs';
import { version } from './package.json';
export default defineConfig({
build: {
emptyOutDir: true,
outDir: path.resolve(__dirname, './out/remote'),
rollupOptions: {
input: {
favicon: normalizePath(path.resolve(__dirname, './assets/icons/favicon.ico')),
index: normalizePath(path.resolve(__dirname, './src/remote/index.html')),
manifest: normalizePath(path.resolve(__dirname, './src/remote/manifest.json')),
remote: normalizePath(path.resolve(__dirname, './src/remote/index.tsx')),
worker: normalizePath(path.resolve(__dirname, './src/remote/service-worker.ts')),
},
output: {
assetFileNames: '[name].[ext]',
chunkFileNames: '[name].js',
entryFileNames: '[name].js',
},
},
},
plugins: [
react(),
ViteEjsPlugin({
prod: process.env.NODE_ENV === 'production',
root: normalizePath(path.resolve(__dirname, './src/remote')),
version,
}),
],
resolve: {
alias: {
'/@/i18n': path.resolve(__dirname, './src/i18n'),
'/@/remote': path.resolve(__dirname, './src/remote'),
'/@/renderer': path.resolve(__dirname, './src/renderer'),
'/@/shared': path.resolve(__dirname, './src/shared'),
},
},
root: path.resolve(__dirname, './src/remote'),
});

View file

@ -148,7 +148,7 @@ async function serveFile(
const fileName = `${file}.${extension}`;
const path = app.isPackaged
? join(__dirname, '../remote', fileName)
: join(__dirname, '../../../../../.erb/dll', fileName);
: join(__dirname, '../../dist/remote', fileName);
let stats: Stats;

View file

@ -1,23 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Security-Policy" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Feishin Remote</title>
<link rel="manifest" href="manifest.json">
<script>
if ('serviceWorker' in navigator) {
const version = encodeURIComponent("<%= version %>");
const prod = encodeURIComponent("<%= prod %>");
navigator.serviceWorker.register(`/worker.js?version=${version}&prod=${prod}`);
}
</script>
</head>
<body>
<div id="root"></div>
</body>
</html>

27
src/remote/index.html Normal file
View file

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Security-Policy" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Feishin Remote</title>
<link rel="manifest" href="manifest.json">
<script>
if ('serviceWorker' in navigator) {
const version = encodeURIComponent("<%= version %>");
const prod = encodeURIComponent("<%= prod %>");
navigator.serviceWorker.register(`/worker.js?version=${version}&prod=${prod}`);
}
</script>
<link rel="icon" href="./favicon.ico">
<script defer="defer" src="./remote.js"></script>
<script defer="defer" src="./worker.js"></script>
<link rel="stylesheet" href="./remote.css">
</head>
<body>
<div id="root"></div>
</body>
</html>