A self hosted chat application with end-to-end encrypted messaging.
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.

54 lines
1.5 KiB

  1. const path = require('path');
  2. const HTMLWebpackPlugin = require('html-webpack-plugin')
  3. // const DynamicCdnWebpackPlugin = require('dynamic-cdn-webpack-plugin');
  4. const WebpackCdnPlugin = require('webpack-cdn-plugin');
  5. let options = {};
  6. options.verbose = true;
  7. module.exports = {
  8. optimization:{
  9. minimize: false, // <---- disables uglify.
  10. // minimizer: [new UglifyJsPlugin()] if you want to customize it.
  11. },
  12. mode: 'production',
  13. entry: './chat.js',
  14. output: {
  15. path: path.resolve(__dirname, '../resources/static/js/'),
  16. // ../resources/static/js/
  17. filename: 'bundle.js'
  18. },
  19. module: {
  20. rules: [{
  21. test: /\.js$/,
  22. exclude: /node_modules/,
  23. use: {
  24. loader: 'babel-loader'
  25. }
  26. }]
  27. },
  28. plugins: [
  29. new HTMLWebpackPlugin(),
  30. new WebpackCdnPlugin({
  31. modules: [
  32. // {
  33. // name: 'vue',
  34. // var: 'Vue',
  35. // path: 'dist/vue.runtime.min.js'
  36. // },
  37. // {
  38. // name: 'vue-router',
  39. // var: 'VueRouter',
  40. // path: 'dist/vue-router.min.js'
  41. // },
  42. // {
  43. // name: 'vuex',
  44. // var: 'Vuex',
  45. // path: 'dist/vuex.min.js'
  46. // }
  47. ],
  48. publicPath: '/node_modules'
  49. })
  50. // new DynamicCdnWebpackPlugin(options)
  51. ]
  52. };