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

Commit

Permalink
get rid of friendly-errors-webpack-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
szwacz committed May 26, 2021
1 parent 0a2e18c commit 25d9041
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
7 changes: 5 additions & 2 deletions build/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@ const compiler = webpack(config({ development: true }));
let electronStarted = false;

const watching = compiler.watch({}, (err, stats) => {
if (!err && !stats.hasErrors() && !electronStarted) {
if (err != null) {
console.log(err);
} else if (!electronStarted) {
electronStarted = true;

childProcess
.spawn(electron, ["."], { stdio: "inherit" })
.on("close", () => {
watching.close();
});
}

console.log(stats.toString({ colors: true }));
});
4 changes: 0 additions & 4 deletions build/webpack.base.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const path = require("path");
const nodeExternals = require("webpack-node-externals");
const FriendlyErrorsWebpackPlugin = require("friendly-errors-webpack-plugin");

const envName = (env) => {
if (env.production) {
Expand Down Expand Up @@ -47,8 +46,5 @@ module.exports = env => {
}
]
},
plugins: [
new FriendlyErrorsWebpackPlugin({ clearConsole: env.development })
]
};
};
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"electron": "^12.0.2",
"electron-builder": "^22.5.1",
"electron-mocha": "^10.0.0",
"friendly-errors-webpack-plugin": "^1.7.0",
"mocha": "^8.3.2",
"source-map-support": "^0.5.6",
"spectron": "^14.0.0",
Expand Down

0 comments on commit 25d9041

Please sign in to comment.