forked from mly-zju/chat-room
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
35 lines (34 loc) · 844 Bytes
/
webpack.config.js
File metadata and controls
35 lines (34 loc) · 844 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
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var config = {
devtool: 'eval-source-map',
entry: ['whatwg-fetch', './src/index.js'],
output: {
path: __dirname + '/dist',
filename: 'bundle.js',
publicPath: '/dist'
},
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
presets: ['es2015', 'react']
}
}, {
test: /\.less$/,
loader: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: ['css-loader', 'less-loader', 'autoprefixer-loader']
}),
exclude: /node_modules/
}, {
test: /\.(jpeg|png|jpg)$/,
loader: 'url-loader'
}
]
},
plugins: [new ExtractTextPlugin('bundle.css')]
}
module.exports = config;;