For example:
import Menu from '@/components/menu';
Is this es6 syntax
走同样的路,发现不同的人生
This is the path alias of webpack
resolve: { // 自动补全的扩展名 extensions: ['.js', '.vue', '.json'], // 默认路径代理 // 例如 import Vue from 'vue',会自动到 'vue/dist/vue.common.js'中寻找 alias: { '@': resolve('src'), '@config': resolve('config'), 'vue$': 'vue/dist/vue.common.js' } }
@ is an alias defined by webpack
build/webpack.base.conf.js
resolve: { extensions: ['.js', '.vue', '.json'], alias: { 'vue$': 'vue/dist/vue.esm.js', '@': resolve('src') } },
This is the path alias of webpack
@ is an alias defined by webpack
build/webpack.base.conf.js