forked from ReactJSResources/react-webpack-babel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
42 lines (40 loc) · 965 Bytes
/
Copy pathwebpack.config.js
File metadata and controls
42 lines (40 loc) · 965 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
"use strict";
var webpack = require('webpack');
var path = require('path');
var loaders = require('./webpack.loaders');
var CopyWebpackPlugin = require('copy-webpack-plugin');
const HOST = process.env.HOST || "0.0.0.0";
const PORT = process.env.PORT || "8888";
module.exports = {
entry: [
`webpack-dev-server/client?http://${HOST}:${PORT}`, // WebpackDevServer host and port
`webpack/hot/only-dev-server`,
`./index.jsx` // Your appʼs entry point
],
devtool: process.env.WEBPACK_DEVTOOL || 'source-map',
output: {
path: path.join(__dirname, 'public'),
filename: 'bundle.js'
},
resolve: {
extensions: ['', '.js', '.jsx']
},
module: {
loaders
},
devServer: {
contentBase: "./public",
noInfo: true, // --no-info option
hot: true,
inline: true,
port: PORT,
host: HOST
},
plugins: [
new webpack.NoErrorsPlugin(),
new webpack.HotModuleReplacementPlugin(),
new CopyWebpackPlugin([
{from: './index.html'}
]),
]
};