webpack.base.config.js 601 B

123456789101112131415161718192021222324252627282930313233
  1. 'use strict';
  2. module.exports = {
  3. module: {
  4. rules: [
  5. {
  6. test: /\.js$/,
  7. include: [
  8. /\/mongoose\//i,
  9. /\/kareem\//i
  10. ],
  11. loader: 'babel-loader',
  12. options: {
  13. presets: ['es2015']
  14. }
  15. }
  16. ]
  17. },
  18. node: {
  19. // Replace these Node.js native modules with empty objects, Mongoose's
  20. // browser library does not use them.
  21. // See https://webpack.js.org/configuration/node/
  22. dns: 'empty',
  23. fs: 'empty',
  24. module: 'empty',
  25. net: 'empty',
  26. tls: 'empty'
  27. },
  28. target: 'web',
  29. mode: 'production'
  30. };