-
Notifications
You must be signed in to change notification settings - Fork 4
/
webpack.config.production.js
68 lines (61 loc) · 1.66 KB
/
webpack.config.production.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
var path = require('path');
var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var autoprefixer = require('autoprefixer');
var csswring = require('csswring');
module.exports = {
entry: {
app: './src/index.js'
},
output: {
filename: 'bundle.js',
path: path.join(__dirname, '/dist/'),
publicPath: '/UberByCity/dist/'
},
plugins: [
new ExtractTextPlugin('bundle.css'),
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.NoErrorsPlugin(),
new webpack.ProvidePlugin({
jQuery: "jquery"
})
],
resolve: {
extensions: ['', '.jsx', '.js', '.json'],
modulesDirectories: ['src', 'node_modules'],
alias: {
config: path.join(__dirname, 'config', process.env.NODE_ENV)
}
},
module: {
loaders: [{
test: /bootstrap\/js\//,
loader: 'imports?jQuery=jquery'
}, {
test: /\.woff(\?v=\d+\.\d+\.\d+)?$/,
loader: "url?limit=10000&minetype=application/font-woff"
}, {
test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/,
loader: "url?limit=10000&minetype=application/font-woff2"
}, {
test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/,
loader: "url?limit=10000&minetype=application/octet-stream"
}, {
test: /\.eot(\?v=\d+\.\d+\.\d+)?$/,
loader: "file"
}, {
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
loader: "url?limit=10000&minetype=image/svg+xml"
}, {
test: /\.js$/,
loaders: ['babel-loader?optional[]=runtime&stage=0'],
exclude: /node_modules/
}, {
test: /\.scss$/,
loader: "css!postcss-loader!sass"
}]
},
postcss: function() {
return [autoprefixer, csswring];
}
};