-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.config.js
More file actions
32 lines (30 loc) · 1.07 KB
/
webpack.config.js
File metadata and controls
32 lines (30 loc) · 1.07 KB
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
/* global module, __dirname */
var path = require('path');
var webpack = require('webpack');
module.exports = {
devtool: 'cheap-module-eval-source-map',
entry: {
index: ['webpack-hot-middleware/client', './index']
},
output: {
path: path.join(__dirname, 'src', 'dist'),
filename: '[name].js',
publicPath: '/static/'
},
plugins: [
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
],
module: {
loaders: [
{test: /\.js$/, loaders: ['babel'], exclude: /node_modules/, include: __dirname},
{test: /\.css?$/, loaders: ['style', 'raw'], include: __dirname},
{test: /\.jsx$/, loader: 'babel-loader!jsx-loader?harmony'},
{test: /\.(woff|woff2)$/, loader: "url-loader?limit=10000&mimetype=application/font-woff"},
{test: /\.ttf$/, loader: "file-loader"},
{test: /\.eot$/, loader: "file-loader"},
{test: /\.svg$/, loader: "file-loader"}
]
}
};