Coder Social home page Coder Social logo

Comments (2)

Esensats avatar Esensats commented on August 19, 2024 1

Calling route('invalid.route') should definitely error and you should see it in the browser console. Is that exactly the code in your app? What page is it on in the Inertia template? Do you have anything like Sentry set up that might be swallowing errors? Are you having this issue in development mode or with a full Vite build, or both?

Making route() stricter about the route names passed into it is something I'm totally open to.

Oof, I was either extremely inattentive or it for some reason didn't show up in the browser console at the time I checked. It does indeed show up in the browser console now that I check again. Sorry for misinforming on that part.

Question, is it possible to have it check all the route calls at build-time? If not, then either way, I guess the simplest solution would be to provide an option to show the error in development time: optional Typescript error/warning.

If this solution is chosen, then the next natural question would be - where to put the option? In what configuration file? If I am not mistaken, the ziggy.js file is not made for that. I guess it'd be put as into some kind of an options param while calling app.use(ZiggyVue({strictRoutes: true})), making ZiggyVue callable, right?

from ziggy.

bakerkretzmar avatar bakerkretzmar commented on August 19, 2024

Calling route('invalid.route') should definitely error and you should see it in the browser console. Is that exactly the code in your app? What page is it on in the Inertia template? Do you have anything like Sentry set up that might be swallowing errors? Are you having this issue in development mode or with a full Vite build, or both?

Making route() stricter about the route names passed into it is something I'm totally open to.

from ziggy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.