Skip to content

vue.cli3的main.js修改原来的代码为现在的作用是啥,能说下么,谢谢 #91

@chenqichun

Description

@chenqichun

main.js默认生成
new Vue({
router,
store,
render: h => h(App)
}).$mount('#app')

----- vue-cli3案例的里main.js ---------
const app = new Vue({
components: {
App,
},
render: h => h(App),
});

window.mountApp = () => {
app.$mount('#app');
};

if (process.env.NODE_ENV === 'production') {
if (window.STYLE_READY) {
window.mountApp();
}
} else {
window.mountApp();
}

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