const webpack=require("webpack"); module.exports = { css: { // 是否使用css分离插件 ExtractTextPlugin extract: false, // 开启 CSS source maps? sourceMap: false, // css预设器配置项 loaderOptions: { // css:{ // "_filter":'filter' // } }, // 启用 CSS modules for all css / pre-processor files. modules: false, }, productionSourceMap: false, runtimeCompiler: true, publicPath:'./', configureWebpack: { plugins: [ new webpack.ProvidePlugin({ $: "jquery", jQuery: "jquery", "window.jQuery": "jquery" }) ], }, devServer: { open: true, host: 'localhost', port: 8085, https: false, //以上的ip和端口是我们本机的;下面为需要跨域的 proxy: {//配置跨域 'obpm': { target: 'http://v5qy.baibaodun.cn/', ws: true, changOrigin: true, //允许跨域 pathRewrite: { '^/obpm': '/obpm'//请求的时候使用这个api就可以 } }, 'kms': { target: 'http://v5qy.test.baibaodun.cn/', ws: true, changOrigin: true, pathRewrite: { '^/kms': '/kms' } }, } } }