-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.production.js
57 lines (55 loc) · 1.46 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
var webpack = require('webpack');
var env = require('./env');
module.exports = {
debug: false,
context: __dirname + '/',
entry: [ './main.jsx' ],
output: {
path: __dirname + '/dist/bundle',
filename: 'bundle.js'
},
resolve: {
extensions: ['', '.js', '.jsx']
},
module: {
preLoaders: [
{
test: /\.jsx$/,
loader: 'jsxhint-loader'
}
],
loaders: [
{
test: /\.(jsx|js)?$/,
loaders: ['jsx?harmony']
},
{
test: /\.(scss|css)?$/,
loader: 'style!css!sass'
},
{
test: /\.(png|jpg)$/,
loader: 'url-loader?limit=16384&mimetype=image/png'
}
]
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.DefinePlugin({
VERSION: JSON.stringify('0.0.1'),
__GOOGLE_ANALYTICS_KEY__: JSON.stringify(env.GOOGLE_ANALYTICS_KEY),
__FIREBASE_URL__: JSON.stringify(env.FIREBASE_URL),
__AIRBRAKE_PRODUCT_ID__: JSON.stringify(env.AIRBRAKE_PRODUCT_ID),
__AIRBRAKE_PRODUCT_KEY__: JSON.stringify(env.AIRBRAKE_PRODUCT_KEY),
__LOCAL_STORAGE_KEY__: JSON.stringify(env.LOCAL_STORAGE_KEY),
__LOCKDOWN_KEY__: JSON.stringify(env.LOCKDOWN_KEY),
__MAILCHIMP_API_KEY__: JSON.stringify(env.MAILCHIMP_API_KEY),
__MAILCHIMP_LIST_ID__: JSON.stringify(env.MAILCHIMP_LIST_ID),
__TEST__: false,
__DEV__: false,
'process.env': {
NODE_ENV: JSON.stringify('production')
}
})
]
};