webpack.serve.js 578 B

123456789101112131415161718192021
  1. /* global module, __dirname */
  2. const HTMLWebpackPlugin = require('html-webpack-plugin');
  3. const common = require("./webpack.common.js");
  4. const { merge } = require("webpack-merge");
  5. const path = require("path");
  6. module.exports = merge(common, {
  7. mode: "development",
  8. devtool: "inline-source-map",
  9. devServer: {
  10. static: [ path.resolve(__dirname, '../') ],
  11. port: 3003
  12. },
  13. plugins: [
  14. new HTMLWebpackPlugin({
  15. title: 'Converse.js Dev',
  16. template: 'webpack.html',
  17. filename: 'index.html'
  18. })
  19. ],
  20. });