-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathwebpack.config.js
More file actions
82 lines (76 loc) · 2.26 KB
/
webpack.config.js
File metadata and controls
82 lines (76 loc) · 2.26 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
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
var cordovaConfig = require('./cordova.config');
var webpack = require('webpack');
var entry = [
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/only-dev-server',
'./app/scripts/main.js'
],
output = {
path: __dirname + '/build/',
filename: 'build.js'
};
module.exports.development = {
debug: true,
devtool: 'eval',
entry: entry,
output: output,
module: {
loaders: [
{test: /\.jsx?$/, loaders: ['react-hot', 'babel-loader'], exclude: /node_modules/},
//{test: /\.css$/, loader: "style-loader!css-loader"},
{test: /\.styl$/, loader: 'style-loader!css-loader!stylus-loader' }
]
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin(),
new webpack.DefinePlugin({
__SERVER__: false,
__DEVELOPMENT__: true,
__DEVTOOLS__: true // <-------- DISABLE redux-devtools HERE
})
]
};
module.exports.production = {
debug: false,
entry: entry,
output: output,
module: {
loaders: [
{test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel-loader'},
//{test: /\.css$/, loader: "style-loader!css-loader"},
{test: /\.styl$/, loader: "style-loader!stylus-loader"},
]
},
plugins: [
new webpack.DefinePlugin({
__SERVER__: false,
__DEVELOPMENT__: false,
__DEVTOOLS__: false // <-------- DISABLE redux-devtools HERE
})
]
};
module.exports.cordova = {
debug: true,
devtool: 'eval',
watch: true,
entry: './app/scripts/main.js',
output: {
path: __dirname + '/' + cordovaConfig.targetDirectory + '/www/js',
filename: 'build.js'
},
module: {
loaders: [
{test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel-loader'},
//{test: /\.css$/, loader: "style-loader!css-loader"},
{test: /\.styl$/, loader: 'style-loader!css-loader!stylus-loader' }
]
},
plugins: [
new webpack.DefinePlugin({
__SERVER__: false,
__DEVELOPMENT__: false,
__DEVTOOLS__: false // <-------- DISABLE redux-devtools HERE
})
]
};