Skip to content

Wrong App.vue when create project with Router and TypeScript  #5770

Closed
@slzn

Description

@slzn

Version

4.5.2

Environment info

Environment Info:

  System:
    OS: Windows 10 10.0.18363
    CPU: (4) x64 Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
  Binaries:
    Node: 12.18.3 - C:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 6.14.6 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 84.0.4147.105
    Edge: Spartan (44.18362.449.0)
  npmPackages:
    @ant-design-vue/babel-helper-vue-transform-on:  1.0.1
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0
    @vue/babel-plugin-transform-vue-jsx:  1.1.2
    @vue/babel-preset-app:  4.5.2
    @vue/babel-preset-jsx:  1.1.2
    @vue/babel-sugar-functional-vue:  1.1.2
    @vue/babel-sugar-inject-h:  1.1.2
    @vue/babel-sugar-v-model:  1.1.2
    @vue/babel-sugar-v-on:  1.1.2
    @vue/cli-overlay:  4.5.2
    @vue/cli-plugin-babel: ~4.5.0 => 4.5.2
    @vue/cli-plugin-eslint: ~4.5.0 => 4.5.2
    @vue/cli-plugin-router: ~4.5.0 => 4.5.2
    @vue/cli-plugin-typescript: ~4.5.0 => 4.5.2
    @vue/cli-plugin-vuex: ~4.5.0 => 4.5.2
    @vue/cli-service: ~4.5.0 => 4.5.2
    @vue/cli-shared-utils:  4.5.2
    @vue/component-compiler-utils:  3.2.0
    @vue/eslint-config-typescript: ^5.0.2 => 5.0.2
    @vue/preload-webpack-plugin:  1.1.2
    @vue/web-component-wrapper:  1.2.0
    eslint-plugin-vue: ^6.2.2 => 6.2.2
    typescript: ~3.9.3 => 3.9.7
    vue: ^2.6.11 => 2.6.11
    vue-class-component: ^7.2.3 => 7.2.5
    vue-eslint-parser:  7.1.0
    vue-hot-reload-api:  2.3.4
    vue-loader:  15.9.3 (16.0.0-beta.4)
    vue-property-decorator: ^8.4.2 => 8.5.1
    vue-router: ^3.2.0 => 3.4.2
    vue-style-loader:  4.1.2
    vue-template-compiler: ^2.6.11 => 2.6.11
    vue-template-es2015-compiler:  1.9.1
    vuex: ^3.4.0 => 3.5.1
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

vue create vue-test

  • select Manually select features
  • select TypeScript and Router
  • continue with default settings

in vue-test
npm run serve

What is expected?

App.vue should contain with <router-link> and <router-view>
to switching Home and About pages.

Web UI should contain a header with Home and About tab

What is actually happening?

App.vue only contains HelloWorld component, ./views/Home.vue and ./views/About.vue would not to be used.

Web UI shows HelloWorld without header.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions