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

update docs for standalone #3011

Open
yurii-github opened this issue Oct 28, 2019 · 0 comments

Comments

@yurii-github
Copy link

@yurii-github yurii-github commented Oct 28, 2019

Version

3.1.3

Reproduction link

https://router.vuejs.org/guide/#javascript

Steps to reproduce

  1. read docs https://router.vuejs.org/guide/#javascript
  2. try with vue-loader with single-file component approach (by moving each page component to its file)
  3. see error "Failed to mount component: template or render function not defined."
  4. make ES6 fixes by adding ".default"
    profit
## index.js

import Vue from 'vue'
import VueRouter from 'vue-router'
import App from './App.vue'

Vue.use(VueRouter)

const router = new VueRouter({
  routes: [
    {path: '/', component: require('./pages/Index.vue').default},
    {path: '/about', component: require('./pages/About.vue').default}
  ]
})

window.app =  new Vue({
  router,
  render: h => h(App)
}).$mount('#app')

What is expected?

docs must have solution for standalone approach when vue compiler IS NOT bundled to webbrowser

What is actually happening?

you don't have such docs, instead you have ton of closed unresolved issues from clients, example:

#824

vuejs/vue-cli#1875

#794

#713

and so on. internet is flooded with this stuff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.