Skip to content

Commit 882331f

Browse files
committed
add process.env to cordova webpack config, add occurence order plugin to dev webpack
1 parent ba15c01 commit 882331f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

webpack/config.cordova.js

+3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ webpackConfig.output = {
3232
webpackConfig.plugins = webpackConfig.plugins.slice(0, -2).concat(
3333
// ...and replace it with the new globals set here
3434
new webpack.DefinePlugin({
35+
'process.env': {
36+
'NODE_ENV': JSON.stringify(env)
37+
},
3538
'__CORDOVA__': true,
3639
'__PRODUCTION__': env == 'production',
3740
'__DEVELOPMENT__': env != 'production',

webpack/config.development.js

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ var ExtractTextPlugin = require('extract-text-webpack-plugin');
1515
var IsomorphicPlugin = require('webpack-isomorphic-tools/plugin');
1616

1717
var plugins = (hot ? [
18+
new webpack.optimize.OccurenceOrderPlugin(),
1819
new webpack.HotModuleReplacementPlugin(),
1920
new webpack.NoErrorsPlugin()
2021
] : [

0 commit comments

Comments
 (0)