forked from start-react/sb-admin-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.production.config.js
38 lines (32 loc) · 968 Bytes
/
webpack.production.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
var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
/**
* This is the Webpack configuration file for production.
*/
module.exports = {
entry: "./src/app",
output: {
path: __dirname + "/build/",
filename: "app.js"
},
plugins: [
new ExtractTextPlugin('style.css', { allChunks: true })
],
module: {
loaders: [
{ test: /\.jsx?$/, exclude: /node_modules/, loaders: ["react-hot", "babel-loader?stage=0"] },
{ test: /\.css$/, loader: "style!css" },
{ test: /\.less$/, loader: 'style!css!less' },
{ test: /\.scss$/, loader: 'style!css!sass' },
{ test: /\.(png|woff|woff2|eot|ttf|svg)$/, loader: 'url-loader?limit=100000' },
{ test: /\.(jpe|jpg|woff|woff2|eot|ttf|svg)(\?.*$|$)/, loaders: ["file-loader"] },
]
},
resolve: {
extensions: ['', '.js', '.jsx', '.css']
},
postcss: [
require('autoprefixer'),
require('postcss-nested')
]
}