remove ziggy npm dependency to fix typescript errors

This commit is contained in:
Gregor Vostrak
2024-03-27 17:18:50 +01:00
committed by Constantin Graf
parent ebd4754773
commit 0b18c22fe0
6 changed files with 3 additions and 38 deletions

24
package-lock.json generated
View File

@@ -38,8 +38,7 @@
"vite": "^5.0.0",
"vite-plugin-checker": "^0.6.2",
"vue": "^3.4.0",
"vue-tsc": "^1.8.27",
"ziggy-js": "^2.1.0"
"vue-tsc": "^1.8.27"
}
},
"node_modules/@aashutoshrathi/word-wrap": {
@@ -5965,27 +5964,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/ziggy-js": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/ziggy-js/-/ziggy-js-2.1.0.tgz",
"integrity": "sha512-BhbVGWwKXSkB2LsY2L+cG78WNdymxzI+wCWWi8qtPMVhxi2vkrHcU2CchEs1NGCkgo41KUOMOrct7Bu7Rpthwg==",
"dev": true,
"dependencies": {
"qs": "~6.9.7"
}
},
"node_modules/ziggy-js/node_modules/qs": {
"version": "6.9.7",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.9.7.tgz",
"integrity": "sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw==",
"dev": true,
"engines": {
"node": ">=0.6"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/zod": {
"version": "3.22.4",
"resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz",

View File

@@ -29,8 +29,7 @@
"vite": "^5.0.0",
"vite-plugin-checker": "^0.6.2",
"vue": "^3.4.0",
"vue-tsc": "^1.8.27",
"ziggy-js": "^2.1.0"
"vue-tsc": "^1.8.27"
},
"dependencies": {
"@heroicons/vue": "^2.1.1",

View File

@@ -4,7 +4,7 @@ import type { DefineComponent } from 'vue';
import { createApp, h } from 'vue';
import { createInertiaApp } from '@inertiajs/vue3';
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';
import { ZiggyVue } from 'ziggy-js';
import { ZiggyVue } from '../../vendor/tightenco/ziggy';
import { createPinia } from 'pinia';
const appName = import.meta.env.VITE_APP_NAME || 'Laravel';

View File

@@ -1,5 +0,0 @@
import routeFn from 'ziggy-js';
declare global {
let route: typeof routeFn;
}

View File

@@ -6,7 +6,6 @@
"compilerOptions": {
"paths": {
"@/*": ["./resources/js/*"],
"ziggy-js": ["./vendor/tightenco/ziggy"]
}
},
"skipLibCheck": true,

View File

@@ -2,14 +2,8 @@ import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import vue from '@vitejs/plugin-vue';
import checker from 'vite-plugin-checker';
import path from 'path';
export default defineConfig({
resolve: {
alias: {
'ziggy-js': path.resolve('vendor/tightenco/ziggy'),
},
},
plugins: [
laravel({
input: 'resources/js/app.ts',