Skip to content

Broken router generator #37

Open
Open
@rigor789

Description

@rigor789

Looks like router generation is currently broken, the generated file (src/router.ts) contains the following:

module.exports = (api, options) => {
  require('@vue/cli-plugin-router/generator')(api, {
    historyMode: options.routerHistoryMode,
  };
  export default new Router(options);
};

This is definitely not the desired result. A router/index.ts file is also generated, which looks correct for the most part, but the import { options } from './router' in main.native.ts no longer works.

After manually refactoring router/index to export the routes, and updating the routes.reduce function in main.native the app builds, but seems like the default route names have changed from lowercase to titlecase so goTo('home') and goTo('about') no longer work unless we either change the route names, or update the goTo calls to use the correct casing (home -> Home, about -> About).

Originally posted by @rigor789 in #35 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy