forked from Fit-Together/Fit-Together
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
50 lines (47 loc) · 1.03 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
const webpack = require('webpack');
const config = {
context: `${__dirname}/src/client`,
entry: {
javascript: './app.js', // take in javascript entry point
html: './index.html', // take in the client's index.html
},
output: {
filename: 'bundle.js',
path: `${__dirname}/dev/client`,
},
module: {
loaders: [
{
// pack js modules together
test: /\.js$/,
exclude: /node_modules/,
loader: ['babel-loader'],
query: {
presets: ['react', 'es2015'],
},
},
{
// include html files
test: /\.html$/,
loader: 'file?name=[name].[ext]',
},
{
test: /\.css$/,
loaders: ['style-loader', 'css-loader'],
},
{
test: /\.png$/,
loader: 'url-loader',
},
],
},
// plugins: [
// new webpack.optimize.DedupePlugin(),
// new webpack.optimize.UglifyJsPlugin({
// compress: {
// warnings: false
// }
// }),
// ]
};
module.exports = config;