vue适配出现Invalid options in vue.config.js: "css.modules" is not allowed

这个问题该如何解决,这是一个vue-cli2的

module.exports = { 
  //双击index.html文件直接运行
  publicPath: './',
  // 当运行 vue-cli-service build 时生成的生产环境构建文件的目录
  outputDir: 'dist',
  lintOnSave: true,
  // 是否使用包含运行时编译器的 Vue 构建版本。设置true后你就可以在使用template
  runtimeCompiler: true,
  // 生产环境是否生成 sourceMap 文件 sourceMap的详解请看末尾
  productionSourceMap: false,
  configureWebpack: config => {
    if (process.env.NODE_ENV === 'production') { // 为生产环境修改配置...
      return {

      }
    } else {
      return {

      }
    }
  },
  css: {
    extract: true, // 开启 CSS source maps?
    sourceMap: false, // css预设器配置项
    modules:false,
    loaderOptions: {
      postcss: {
        plugins: [
          require('postcss-pxtorem')({
            rootValue: 37.5, // 换算的基数
            selectorBlackList: ['weui', 'mu'], // 忽略转换正则匹配项
            propList: ['*']
          })
        ]
      }
    }
  },

  // webpack-dev-server 相关配置
  devServer: { // 设置代理
    hot: true, // 热加载
    host: '0.0.0.0', // ip地址
    port: 8082, // 端口
    https: false, // false关闭https,true为开启
    open: true, // 自动打开浏览器
    overlay: {
      warnings: false,
      errors: false
    }
  }
}


img

img

参考这个改下https://blog.csdn.net/weixin_43957184/article/details/103621350