8000 <div id="app"> is in App.vue and index.html · Issue #4158 · vuejs/vue-cli · GitHub
[go: up one dir, main page]

Skip to content
<div id="app"> is in App.vue and index.html #4158
Closed
@GreggOD

Description

@GreggOD

Version

3.8.0

Reproduction link

https://codesandbox.io/s/vue-template-p5kdn?fontsize=14

Steps to reproduce

Install @vue/cli;
Create a project;
In main.js change mount to:

new Vue({
  el: "#app", // because this id exists twice
  components: { App },
  template: "<App/>"
});

watch app serve fail because #app exists in App.vue and index.html.

What is expected?

App to mount

What is actually happening?

App is failing to mount due to duplicate id


While helping someone implement ant-design package with vue cli I noticed in App.vue its root element is a div with the id of "app".
Then in public/index.html there is also a div with id "app".

The id should be removed from App.vue

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

      0