Skip to content

Commit

Permalink
Added seperate webpack build configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
arman37 committed Apr 27, 2018
1 parent cba173c commit ecae7b9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"start": "electron .",
"test": "jest -u --watchAll",
"build": "webpack --progress --colors --config ./webpack.config.js --mode production",
"build": "webpack --progress --colors --config ./webpack.build-config.js --mode production",
"watch": "webpack-dev-server --progress --colors --hot --config ./webpack.config.js --mode development"
},
"repository": {
Expand Down
23 changes: 23 additions & 0 deletions webpack.build-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
./webpack.build-config.js
*/
module.exports = {
entry: './app/components/app.js',
output: {
path: __dirname + '/dist',
publicPath: '/',
filename: 'bundle.js'
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: ['babel-loader']
}
]
},
resolve: {
extensions: ['*', '.js', '.jsx']
}
};

0 comments on commit ecae7b9

Please sign in to comment.