Sparrow is a libre front-end forum software powered by the Matrix protocol and using a Matrix homeserver as its back-end

webpack.config.js 611B

1234567891011121314151617181920212223242526272829303132
  1. const path = require('path');
  2. const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
  3. const HtmlWebpackPlugin = require('html-webpack-plugin');
  4. module.exports = {
  5. entry: ['babel-polyfill', './src/index.js'],
  6. devtool: 'source-map',
  7. module: {
  8. rules: [
  9. {
  10. test: /\.js$/,
  11. exclude: /node_modules/,
  12. use: {
  13. loader: 'babel-loader',
  14. options: {
  15. presets: ['env', 'flow']
  16. }
  17. }
  18. }
  19. ]
  20. },
  21. output: {
  22. filename: 'sparrow.js',
  23. path: path.resolve(__dirname, 'dist')
  24. },
  25. plugins: [
  26. new UglifyJSPlugin(),
  27. new HtmlWebpackPlugin({
  28. template: './src/index.html'
  29. })
  30. ]
  31. };