What are the independent configuration items in webpack config?

module.exports = {
  entry: {
  },
  output: {
  },
  resolve: {
  },
  resolveLoader: {
  },
  module: {
   
    loaders: [
      //  loader
      {
        test: /\.vue$/,
        loader: "vue"
      },
      {
        test: /\.js$/,
        loader: "babel",
        include: projectRoot,
        exclude: /node_modules/
      },
      {
        test: /\.json$/,
        loader: "json"
      },
      {
        test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
        loader: "url",
        query: {
          limit: 10000,
          name: utils.assetsPath("img/[name].[hash:7].[ext]")
        }
      },
      {
        test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
        loader: "url",
        query: {
          limit: 10000,
          name: utils.assetsPath("fonts/[name].[hash:7].[ext]")
        }
      }
    ]
  },
  eslint: {
    // eslint 
    formatter: require("eslint-friendly-formatter")
  },
  vue: {
    // .vue  loader  (autoprefixer)
    loaders: utils.cssLoaders({ sourceMap: useCssSourceMap }),
    postcss: [
      require("autoprefixer")({
        browsers: ["last 2 versions"]
      })
    ]
  }
}

I, a beginner of webpack, recently set up a project to use vue and webpack together. After checking some configurations of webpack on the Internet, I found that there are two independent configuration items eslint and vue in the configuration of webpack at the same level as module . I looked up a lot of documents on the Internet and did not find out how to use this independent configuration item. I asked the boss to tell me the reason for doing so

.
Apr.25,2021

this is how you write webpack1.x, right?

Menu