Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

You may need an appropriate loader to handle this file type when importing images

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",
    }],
  },
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #You #loader #handle #file #type #importing #images
ADD COMMENT
Topic
Name
4+6 =