Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
chenqichun opened this issue Apr 1, 2020 · 0 comments

Comments

@chenqichun
Copy link

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();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant