Advertisement
Guest User

Untitled

a guest
Feb 29th, 2016
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // file - webpack.config.js
  2.  
  3. var path = require('path');
  4. var webpack = require('webpack');
  5.  
  6. module.exports = {
  7.     entry: {
  8.         app: ['./src/index']
  9.     },
  10.     output: {
  11.         path: path.join(__dirname, 'app/js'),
  12.         filename: 'bundle.js',
  13.         publicPath: "http://localhost:3000/app/"
  14.     },
  15.     module: {
  16.         loaders: [
  17.             {
  18.                 test: /\.js$/,
  19.                 loader: 'babel-loader',
  20.                 exclude: /node_modules/,
  21.                 include: path.join(__dirname, 'src')
  22.             }
  23.         ]
  24.     },
  25.     devServer: {
  26.         port: 3000,
  27.         hot: true,
  28.         headers: {
  29.             "Access-Control-Allow-Origin": "http://127.0.0.1:3000"
  30.         }
  31.     },
  32.     plugins: [
  33.         new webpack.HotModuleReplacementPlugin(),
  34.         new webpack.NoErrorsPlugin()
  35.     ]
  36. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement