webpack.config.rn.js
 1  // import path for resolving file paths
 2  var path = require('path');
 3  module.exports = {
 4      // Specify the entry point for our app.
 5      entry: [
 6          path.join(__dirname, '..', 'react-native.js')
 7      ],
 8      // Specify the output file containing our bundled code
 9      output: {
10          path: path.join(__dirname, '..', 'dist'),
11          filename: 'aws-sdk-react-native.js',
12          libraryTarget: 'umd',
13          library: 'AWS'
14      },
15      resolve: {
16        packageAlias: 'react-native'
17      },
18      module: {
19          /**
20           * Tell webpack how to load 'json' files.
21           * By default, webpack only knows how to handle
22           * JavaScript files.
23           * When webpack comes across a 'require()' statement
24           * where a json file is being imported, it will use
25           * the json-loader.
26           */
27          loaders: [
28              {
29                  test: /\.json$/,
30                  loaders: ['json']
31              }
32          ]
33      }
34  };