-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathwebpack-production.config.js
More file actions
37 lines (36 loc) · 1.01 KB
/
webpack-production.config.js
File metadata and controls
37 lines (36 loc) · 1.01 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
33
34
35
36
37
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var path = require('path');
var webpack = require('webpack');
module.exports = {
devtool: 'cheap-source-map',
entry: [
'./app/index.jsx'
],
output: {
path: path.join(__dirname, 'result/assets'),
filename: 'bundle.js',
sourceMapFilename: 'bundle.map',
publicPath: '/assets/'
},
resolve: {
extensions: ['', '.js', '.jsx']
},
plugins: [
new ExtractTextPlugin('bundle.css', { allChunks: true })
],
module: {
loaders: [
{
test: /\.jsx$/,
loaders: ['babel'],
include: path.join(__dirname, 'app')
},
{
test: /\.styl$/,
loader: ExtractTextPlugin.extract('style-loader', 'css-loader!stylus-loader')
},
{test: /\.png$/, loader: 'url-loader?limit=100000'},
{test: /\.svg$/, loader: 'url-loader?limit=100000'}
]
}
};