webpack.conf.js 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. var path = require('path'),
  2. webpack = require('webpack');
  3. module.exports = {
  4. entry: {
  5. app: './app/main.js',
  6. vendor: [
  7. 'codemirror',
  8. 'chartist',
  9. 'selectize',
  10. 'rangetouch',
  11. 'remodal',
  12. 'toastr',
  13. 'bootstrap',
  14. 'sortablejs',
  15. 'dropzone',
  16. 'eonasdan-bootstrap-datetimepicker',
  17. 'watchjs',
  18. 'js-yaml',
  19. 'speakingurl'
  20. ]
  21. },
  22. output: {
  23. path: path.resolve(__dirname, 'js'),
  24. library: 'Grav'
  25. },
  26. externals: {
  27. jquery: 'jQuery',
  28. 'grav-config': 'GravAdmin'
  29. },
  30. module: {
  31. preLoaders: [
  32. { test: /\.json$/, loader: 'json' },
  33. { test: /\.js$/, loader: 'eslint', exclude: /node_modules/ }
  34. ],
  35. loaders: [
  36. { test: /\.css$/, loader: "style-loader!css-loader" },
  37. { test: /\.js$/, loader: 'babel', exclude: /node_modules/, query: { presets: ['es2015', 'stage-3'] } }
  38. ]
  39. }
  40. };