Advertisement
Guest User

Untitled

a guest
Oct 17th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const path = require('path');
  2. const webpack = require('webpack');
  3.  
  4. module.exports = {
  5.     entry: './src/app.js',
  6.     output: {
  7.         path: path.resolve(__dirname, 'public/scripts'),
  8.         filename: 'bundle.js'
  9.     },
  10.     module: {
  11.         rules: [
  12.             {
  13.                 loader: 'babel-loader',
  14.                 test: /\.js$/,
  15.                 exclude: /node_modules/
  16.             }
  17.         ]
  18.     },
  19.     devtool: 'cheap-module-eval-source-map',
  20.     devServer: {
  21.         contentBase: './public',
  22.         hot: true,
  23.         inline: true,
  24.         port: 9000
  25.     },
  26.     plugins: [
  27.         new webpack.NamedModulesPlugin(),
  28.         new webpack.HotModuleReplacementPlugin()
  29.     ]
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement