mirror of
https://github.com/getAlby/hub.git
synced 2026-08-13 12:33:39 +02:00
chore: make vite config compatible with native config loader (#2542)
Replace __dirname with import.meta.dirname and use Vite's native resolve.tsconfigPaths option instead of the vite-tsconfig-paths plugin. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
5125418188
commit
1c7c026e54
3 changed files with 5 additions and 26 deletions
|
|
@ -77,8 +77,7 @@
|
|||
"typescript": "^5.9.3",
|
||||
"typescript-eslint": "^8.61.0",
|
||||
"vite": "^8.2.0",
|
||||
"vite-plugin-pwa": "^1.3.0",
|
||||
"vite-tsconfig-paths": "^6.1.1"
|
||||
"vite-plugin-pwa": "^1.3.0"
|
||||
},
|
||||
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,11 @@ import react from "@vitejs/plugin-react-swc";
|
|||
import path from "path";
|
||||
import { defineConfig, Plugin } from "vite";
|
||||
import { VitePWA } from "vite-plugin-pwa";
|
||||
import tsconfigPaths from "vite-tsconfig-paths";
|
||||
|
||||
export default defineConfig(({ command }) => ({
|
||||
plugins: [
|
||||
react(),
|
||||
tailwindcss(),
|
||||
tsconfigPaths(),
|
||||
VitePWA({
|
||||
registerType: "autoUpdate",
|
||||
// disable service worker - Alby Hub cannot be used offline (and also breaks oauth callback)
|
||||
|
|
@ -66,9 +64,10 @@ export default defineConfig(({ command }) => ({
|
|||
},
|
||||
},
|
||||
resolve: {
|
||||
tsconfigPaths: true,
|
||||
alias: {
|
||||
src: path.resolve(__dirname, "./src"),
|
||||
wailsjs: path.resolve(__dirname, "./wailsjs"),
|
||||
src: path.resolve(import.meta.dirname, "./src"),
|
||||
wailsjs: path.resolve(import.meta.dirname, "./wailsjs"),
|
||||
// used to refrence public assets when importing images or other
|
||||
// assets from the public folder
|
||||
// this is necessary to inject the base path during build
|
||||
|
|
|
|||
|
|
@ -3351,7 +3351,7 @@ dayjs@^1.11.20:
|
|||
resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.20.tgz#88d919fd639dc991415da5f4cb6f1b6650811938"
|
||||
integrity sha512-YbwwqR/uYpeoP4pu043q+LTDLFBLApUP6VxRihdfNTqu4ubqMlGDLd6ErXhEgsyvY0K6nCs7nggYumAN+9uEuQ==
|
||||
|
||||
debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.6, debug@^4.4.1, debug@^4.4.3:
|
||||
debug@^4.1.0, debug@^4.3.1, debug@^4.3.2, debug@^4.3.6, debug@^4.4.1, debug@^4.4.3:
|
||||
version "4.4.3"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a"
|
||||
integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==
|
||||
|
|
@ -4028,11 +4028,6 @@ globalthis@^1.0.4:
|
|||
define-properties "^1.2.1"
|
||||
gopd "^1.0.1"
|
||||
|
||||
globrex@^0.1.2:
|
||||
version "0.1.2"
|
||||
resolved "https://registry.yarnpkg.com/globrex/-/globrex-0.1.2.tgz#dd5d9ec826232730cd6793a5e33a9302985e6098"
|
||||
integrity sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==
|
||||
|
||||
gopd@^1.0.1, gopd@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1"
|
||||
|
|
@ -5921,11 +5916,6 @@ ts-api-utils@^2.5.0:
|
|||
resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-2.5.0.tgz#4acd4a155e22734990a5ed1fe9e97f113bcb37c1"
|
||||
integrity sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==
|
||||
|
||||
tsconfck@^3.0.3:
|
||||
version "3.1.6"
|
||||
resolved "https://registry.yarnpkg.com/tsconfck/-/tsconfck-3.1.6.tgz#da1f0b10d82237ac23422374b3fce1edb23c3ead"
|
||||
integrity sha512-ks6Vjr/jEw0P1gmOVwutM3B7fWxoWBL2KRDb1JfqGVawBmO5UsvmWOQFGHBPl5yxYz4eERr19E6L7NMv+Fej4w==
|
||||
|
||||
tslib@^2.0.0, tslib@^2.1.0, tslib@^2.4.0, tslib@^2.8.1:
|
||||
version "2.8.1"
|
||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f"
|
||||
|
|
@ -6121,15 +6111,6 @@ vite-plugin-pwa@^1.3.0:
|
|||
workbox-build "^7.4.1"
|
||||
workbox-window "^7.4.1"
|
||||
|
||||
vite-tsconfig-paths@^6.1.1:
|
||||
version "6.1.1"
|
||||
resolved "https://registry.yarnpkg.com/vite-tsconfig-paths/-/vite-tsconfig-paths-6.1.1.tgz#d5c28cba79c89ebf76489ef1040024b21df6da3a"
|
||||
integrity sha512-2cihq7zliibCCZ8P9cKJrQBkfgdvcFkOOc3Y02o3GWUDLgqjWsZudaoiuOwO/gzTzy17cS5F7ZPo4bsnS4DGkg==
|
||||
dependencies:
|
||||
debug "^4.1.1"
|
||||
globrex "^0.1.2"
|
||||
tsconfck "^3.0.3"
|
||||
|
||||
vite@^8.2.0:
|
||||
version "8.2.0"
|
||||
resolved "https://registry.yarnpkg.com/vite/-/vite-8.2.0.tgz#902fcd3dc0312f553c85b6cbc4625dcaca2d8df8"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue