1、.修改webpack.base.conf.js 文件中添加'/static': resolve('static'),如下所示,此时存放于static的json文件就可以通过/static/xxx.json访问到了
在resolve:
{ extensions: ['.js', '.vue', '.json'],
alias: {
'vue$': 'vue/dist/vue.esm.js',
'/src': resolve('src'),
'/libs': path.resolve(__dirname, '../src/libs'),
'/static': resolve('static'), }
},