-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathwebpack.config.js
44 lines (44 loc) · 1.43 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
var path = require('path');
var webpack = require('webpack');
var BowerWebpackPlugin = require('bower-webpack-plugin');
//var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
context: path.join(__dirname, 'src'),
entry: './index',
output: {
path: path.join(__dirname, 'assets')
},
resolve: {
extensions: ['', '.js', '.jsx']
},
module: {
loaders: [//{
// test: /\.css$/,
// loader: ExtractTextPlugin.extract('style-loader', 'css-loader')
//},
{test: /\.jsx$/, loader: 'jsx-loader'},
{test: /\.css$/, loader: 'style-loader!css-loader'},
{test: /\.json$/, loader: 'json-loader'},
{test: /\.hbs$/, loader: 'handlebars-loader'},
{
test: /\.(eot|woff|ttf|svg|png|jpg)$/,
loader: 'url-loader?limit=30000&name=[name]-[hash].[ext]'
}
]
},
plugins: [
//new webpack.optimize.UglifyJsPlugin(),
new webpack.DefinePlugin({
NODE_ENV: JSON.stringify('production')
}),
new BowerWebpackPlugin({
modulesDirectories: ['bower_components'],
manifestFiles: ['bower.json', '.bower.json'],
includes: /.*/,
excludes: /.*\.less$/
//}),
//new ExtractTextPlugin('styles.css', {
// allChunks: true
})
]
};