While using Visual Studio Code version 1.13.1V and referring to the vue.js guide on lazy loading, I encountered an issue when writing the following code snippet:
import Vue from 'vue'
import Router from 'vue-router'
const Health = () => import('@/components/health')
When inputting this code, vscode displayed the following errors:
file: 'file:///c%3A/projects/vue-lazy-loading/src/router/index.js'
severity: 'Error'
message: 'Expression expected.'
at: '3,22'
source: 'js'
file: 'file:///c%3A/projects/vue-lazy-loading/src/router/index.js'
severity: 'Error'
message: 'Variable declaration expected.'
at: '3,28'
source: 'js'
This is how it appears visually: https://i.stack.imgur.com/TRpAM.png
Is there an issue with the code itself or is it related to VS-Code? What is the correct way to write it?