webpack.js 857 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. const path = require('path')
  2. const webpack = require('webpack')
  3. module.exports = [
  4. {
  5. entry: {
  6. login: path.join(__dirname, 'src/login.js'),
  7. main: path.join(__dirname, 'src/main.js'),
  8. maintenance: path.join(__dirname, 'src/maintenance.js'),
  9. recommendedapps: path.join(__dirname, 'src/recommendedapps.js'),
  10. },
  11. output: {
  12. filename: '[name].js',
  13. path: path.resolve(__dirname, 'js/dist'),
  14. jsonpFunction: 'webpackJsonpCore'
  15. },
  16. module: {
  17. rules: [
  18. {
  19. test: /davclient/,
  20. use: 'exports-loader?dav'
  21. }
  22. ]
  23. },
  24. plugins: [
  25. new webpack.ProvidePlugin({
  26. '_': "underscore",
  27. $: "jquery",
  28. jQuery: "jquery"
  29. })
  30. ]
  31. },
  32. {
  33. entry: {
  34. systemtags: path.resolve(__dirname, 'js/systemtags/merged-systemtags.js')
  35. },
  36. output: {
  37. filename: '[name].js',
  38. path: path.resolve(__dirname, 'js/dist')
  39. }
  40. }
  41. ]