universal-vue / uvue

Vue CLI plugin to create universal Vue applications with ease
https://universal-vue.github.io/docs/
MIT License
127 stars 13 forks source link

Plugins loading static assets as route #15

Closed Tjark-Kuehl closed 5 years ago

Tjark-Kuehl commented 5 years ago

Describe the bug By using this code as a core plugin the whole application breaks because the router.beforeEach sees any static asset as route.

Output: To: / From: / To: /assets/fonts/Roboto-Light.woff2 From: / To: /assets/fonts/Roboto-Regular.woff2 From: / To: /assets/fonts/Roboto-Condensed.woff2 From: / To: /app.js From: / To: /0.js From: / To: /legal.js From: / To: /img/login_bg.8270a4cb.jpg From: /

To Reproduce Clone the repo, npm install and execute npm run dev. Then you see a login screen and the error should appear in the console. As well as the background image is not loading correctly.

Repo

Expected behavior The site not breaking when making static file assets

Additional context

Please indicate versions of:

node: 11.x
vue-cli: Newest
uvue: Newest
os: Ubuntu 18.10 / Windows 10
browser: Google Chrome 71