No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Can't get rid of vue-router

    Framework
    4
    4
    681
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      elias p last edited by

      Hi,

      quasar - 1.0.0-beta.4 / @quasar/app - 1.0.0-beta.8

      My application doesn’t use the vue-router, it is not referenced in any file, still I can’t remove the directory “router”.
      (node:19916) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open ‘D:\Documents…\src\router\index.js’.
      Is it a necessary evil or I miss something?

      Thanks in advance

      R 1 Reply Last reply Reply Quote 0
      • nothingismagick
        nothingismagick last edited by

        Hmm. You don’t have any routes whatsoever? Vue is sort of a webframework, and webframeworks use things like URLs and webviews to collate information and display them to the user.

        1 Reply Last reply Reply Quote 0
        • R
          rusia @elias p last edited by

          @elias-p said in Can't get rid of vue-router:

          Is it a necessary evil or I miss something?

          It’s no evil at all. Even if you don’t use router (that is you use only one route for the whole app) I don’t think it will affect anything (app speed, production package size etc.) So just don’t delete the router directory.

          1 Reply Last reply Reply Quote 0
          • S
            scott last edited by

            Simple apps may want to migrate, a simple router doesn’t ‘need’ the whole router folder and multiple routes but the toolchain seems to be hard coded (I’ll keep the opinions to myself). However, as a workaround, create/keep the /router folder with index.js/ts inside and inside that file…

            import router from ‘…/router.js’ // or whereever you want to put it…
            export default router;

            Done, hard coded path averted.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post