Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Commit

Permalink
Webpack updated to v4
Browse files Browse the repository at this point in the history
  • Loading branch information
szwacz committed Jun 12, 2018
1 parent e840161 commit 78f3e10
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A minimalistic boilerplate for [Electron runtime](http://electron.atom.io). Tested on Windows, macOS and Linux.

This project contains only bare minimum of dependencies, to provide you with nice development environment. Doesn't impose on you any frontend technologies, so you can pick your favourite.
This project contains only bare minimum of tooling and dependencies, to provide you with simple to understand and extensible base (still this is fully functional Electron environment). Also doesn't impose on you any frontend technologies, so you can pick your favourite.

# Quick start

Expand Down Expand Up @@ -56,7 +56,7 @@ console.log(env.name);
To do so edit `package.json`:
```json
"devDependencies": {
"electron": "1.7.9"
"electron": "2.0.2"
}
```
*Side note:* [Electron authors recommend](http://electron.atom.io/docs/tutorial/electron-versioning/) to use fixed version here.
Expand Down
10 changes: 9 additions & 1 deletion build/webpack.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@ const path = require("path");
const nodeExternals = require("webpack-node-externals");
const FriendlyErrorsWebpackPlugin = require("friendly-errors-webpack-plugin");

const translateEnvToMode = (env) => {
if (env === "production") {
return "production";
}
return "development";
};

module.exports = env => {
return {
target: "node",
target: "electron-renderer",
mode: translateEnvToMode(env),
node: {
__dirname: false,
__filename: false
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
"mocha": "^5.2.0",
"source-map-support": "^0.5.0",
"spectron": "^3.7.2",
"style-loader": "^0.19.0",
"webpack": "^3.8.1",
"style-loader": "^0.21.0",
"webpack": "^4.12.0",
"webpack-merge": "^4.1.0",
"webpack-node-externals": "^1.6.0"
}
Expand Down

0 comments on commit 78f3e10

Please sign in to comment.