vuejs / vue-router

🚦 The official router for Vue 2
http://v3.router.vuejs.org/
MIT License
18.99k stars 5.06k forks source link

Examples not working in file based environments. #694

Closed Steviey closed 8 years ago

Steviey commented 8 years ago

Currently the examples are somehow hard coded to webpack and a local tcp connection. This makes it very difficult to port the code to desktop and mobile applications, which usually need file based JavaScript . Since Webpack does not write files- out of the box (while monitoring), Browserify + Watchify are best choice for desktop and mobile developments with VueJs (code once - monitor everywhere). I'm also wondering about so many different file names from an educational point of view.

index.html:2 GET file:///C:/global.css net::ERR_FILE_NOT_FOUND index.html:5 GET file:///C:/build/shared.js net::ERR_FILE_NOT_FOUND index.html:6 GET file:///C:/build/lazy-loading.js net::ERR_FILE_NOT_FOUND

Since things are changing, please have mobile, desktop and crossplatform developments in mind too. Thank you.

fnlctrl commented 8 years ago

Hi, thanks for filling this issue.

Examples are not meant for "mobile, desktop and crossplatform". They are in separated files to make them easier to read.

posva commented 8 years ago

As @fnlctrl said, the examples are meant how to use vue-router, not how to setup a build environment. You should check vue-cli for that purposes or search specific boilerplates