const webpack = require('webpack')
const path = require('path'); //引入path模块
function resolve(dir) {
  return path.join(__dirname, dir) //path.join(__dirname)设置绝对路径
}
//网站title
const name = "醉面美食【唯一官网】"

module.exports = {
  chainWebpack: config => {
    config.plugin('provide').use(webpack.ProvidePlugin, [{
      $: 'jquery',
      jquery: 'jquery',
      jQuery: 'jquery',
      'window.jQuery': 'jquery'
    }]);

  },
  configureWebpack: {
    devServer: {
      proxy: {
        '/website-api': {
          target: 'https://www.hsayi.com',
          changeOrigin: true, //是否跨域
          // pathRewrite: {
          //   '^/api': '' //规定请求地址以什么作为开头
          // }
        }
      }
    }
  }
}
