function resolve (dir) {
return path.join(__dirname, '..', dir)
}
resolve: {
extensions: ['.js', '.vue', '.json','.styl'],
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': resolve('src'),
// '%': resolve('src/components')
'components': path.resolve(__dirname, '../src/components')
}
},
import Vue from 'vue'
import Router from 'vue-router'
// import Header from '@/components/Header'
import Rating from 'components/rating'
// import Head from '../components/header'
// import Head from '%/header'
import Sell from 'components/sell'
import Detail from 'components/detail'
转载于:https://www.cnblogs.com/xiongwei2017/p/6646696.html