Error handling about webpack router plugin using vue-cli
Let's explain it directly by the picture above: the pitfalls that novices will encounter!
1. Using npm to run the command normally will report an error:
2. But the page will appear: [Vue Warning]: Rendering error: "TypeError: Cannot read property 'match' of undefined"
3. Direct and specific solutions:
4. Change to the following code:
5. The running page returns to normal:
6. For more information and reference, please refer to the official document vue-router official website document