-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathwebpack.config.js
37 lines (35 loc) · 975 Bytes
/
webpack.config.js
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
var path = require('path');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var clientPath = path.join(__dirname, 'client');
module.exports = {
devtool: 'source-map',
module: {
loaders: [
{test: /\.js$/, include: path.join(__dirname, 'client'), loaders: ['react-hot', 'babel']},
{test: /\.scss$/, include: clientPath, loaders: ['style', 'css', 'sass', 'sourceMap']},
],
},
entry: [
'webpack-dev-server/client?http://localhost:4000',
'webpack/hot/only-dev-server',
'./client/index.js',
],
output: {
path: path.join(__dirname, 'build'),
filename: 'index.js',
publicPath: '/auth-demo/',
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin(),
new HtmlWebpackPlugin({
title: 'Redux Auth Demo',
template: './client/index.template.ejs',
inject: 'body',
}),
],
resolve: {
extensions: ['', '.js',],
},
};