Skip to content

Commit

Permalink
remove ziggy npm dependency to fix typescript errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregor Vostrak authored and Gregor Vostrak committed Mar 27, 2024
1 parent a6b1941 commit c40496e
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 38 deletions.
24 changes: 1 addition & 23 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion resources/js/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Check failure on line 7 in resources/js/app.ts

View workflow job for this annotation

GitHub Actions / build

Cannot find module '../../vendor/tightenco/ziggy' or its corresponding type declarations.
import { createPinia } from 'pinia';

const appName = import.meta.env.VITE_APP_NAME || 'Laravel';
Expand Down
5 changes: 0 additions & 5 deletions resources/js/types/ziggy.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"compilerOptions": {
"paths": {
"@/*": ["./resources/js/*"],
"ziggy-js": ["./vendor/tightenco/ziggy"]
}
},
"skipLibCheck": true,
Expand Down
6 changes: 0 additions & 6 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit c40496e

Please sign in to comment.