📌  相关文章
📜  导入图像时,您可能需要适当的加载器来处理此文件类型 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:43.249000             🧑  作者: Mango

代码示例1
module: {

    // apply loaders to files that meet given conditions
    loaders: [{
      test: /\.jsx?$/,
      include: path.join(__dirname, '/client/src'),
      loader: 'babel-loader',
      query: {
        presets: ["react", "es2015", "stage-1"]
      }
    },
    {
      test: /\.(gif|svg|jpg|png)$/,
      loader: "file-loader",
    }],
  },