webpack.config.rn-dep.js 837 B

12345678910111213141516171819202122232425262728293031
  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. 'xml2js'
  7. ],
  8. // Specify the output file containing our bundled code
  9. output: {
  10. path: path.join(__dirname, '..', 'dist'),
  11. filename: 'xml2js.js',
  12. libraryTarget: 'commonjs2',
  13. },
  14. resolve: {},
  15. module: {
  16. /**
  17. * Tell webpack how to load 'json' files.
  18. * By default, webpack only knows how to handle
  19. * JavaScript files.
  20. * When webpack comes across a 'require()' statement
  21. * where a json file is being imported, it will use
  22. * the json-loader.
  23. */
  24. loaders: [
  25. {
  26. test: /\.json$/,
  27. loaders: ['json']
  28. }
  29. ]
  30. }
  31. };