webpack.js 824 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. },
  10. output: {
  11. filename: '[name].js',
  12. path: path.resolve(__dirname, 'js/dist')
  13. },
  14. module: {
  15. rules: [
  16. {
  17. test: /davclient/,
  18. use: 'exports-loader?dav'
  19. }
  20. ]
  21. },
  22. plugins: [
  23. new webpack.ProvidePlugin({
  24. '_': "underscore",
  25. $: "jquery",
  26. jQuery: "jquery"
  27. })
  28. ]
  29. },
  30. {
  31. entry: {
  32. share_backend: path.resolve(__dirname, 'js/merged-share-backend.js'),
  33. systemtags: path.resolve(__dirname, 'js/systemtags/merged-systemtags.js')
  34. },
  35. output: {
  36. filename: '[name].js',
  37. path: path.resolve(__dirname, 'js/dist')
  38. }
  39. }
  40. ]