You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

webpack.js 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. install: path.join(__dirname, 'src/install.js'),
  11. files_client: path.join(__dirname, 'src/files/client.js'),
  12. files_fileinfo: path.join(__dirname, 'src/files/fileinfo.js'),
  13. files_iedavclient: path.join(__dirname, 'src/files/iedavclient.js')
  14. },
  15. output: {
  16. filename: '[name].js',
  17. path: path.resolve(__dirname, 'js/dist'),
  18. jsonpFunction: 'webpackJsonpCore'
  19. },
  20. module: {
  21. rules: [
  22. {
  23. test: /davclient/,
  24. loader: 'exports-loader',
  25. options: {
  26. type: 'commonjs',
  27. exports: 'dav',
  28. }
  29. }
  30. ]
  31. },
  32. plugins: [
  33. new webpack.ProvidePlugin({
  34. '_': "underscore",
  35. $: "jquery",
  36. jQuery: "jquery"
  37. })
  38. ]
  39. },
  40. {
  41. entry: {
  42. systemtags: path.resolve(__dirname, 'src/systemtags/merged-systemtags.js')
  43. },
  44. output: {
  45. filename: '[name].js',
  46. path: path.resolve(__dirname, 'js/dist')
  47. }
  48. }
  49. ]