Guest User

Untitled

a guest
May 8th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. const path = require("path");
  2. const HtmlWebpackPlugin = require('html-webpack-plugin');
  3.  
  4. module.exports = {
  5. entry: "./app/index.js",
  6. output: {
  7. path: path.resolve(__dirname, "public"),
  8. filename: "bundle.js",
  9. publicPath: '/'
  10. },
  11. module: {
  12. rules: [
  13. {
  14. test: /\.js$/,
  15. use: {
  16. loader: "babel-loader",
  17. options: { presets: ["env"] }
  18. }
  19. }
  20. ]
  21. },
  22. plugins: [
  23. new HtmlWebpackPlugin({
  24. filename: 'index.html',
  25. template: './app/index.html'
  26. })
  27. ],
  28. devServer: {
  29. historyApiFallback: true,
  30. contentBase: path.resolve(__dirname, 'public'),
  31. compress: true,
  32. port: 8080
  33. }
  34. };
Advertisement
Add Comment
Please, Sign In to add comment