mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-12 09:00:58 +00:00
Merge pull request #75 from satoshilabs/better-webpack-errors
Added OS notification when webpack failed to compile the project
This commit is contained in:
commit
f435b8669c
@ -34,8 +34,8 @@
|
|||||||
"ethereumjs-tx": "^1.3.3",
|
"ethereumjs-tx": "^1.3.3",
|
||||||
"ethereumjs-units": "^0.2.0",
|
"ethereumjs-units": "^0.2.0",
|
||||||
"ethereumjs-util": "^5.1.4",
|
"ethereumjs-util": "^5.1.4",
|
||||||
"git-revision-webpack-plugin": "^3.0.3",
|
|
||||||
"flow-webpack-plugin": "^1.2.0",
|
"flow-webpack-plugin": "^1.2.0",
|
||||||
|
"git-revision-webpack-plugin": "^3.0.3",
|
||||||
"hdkey": "^0.8.0",
|
"hdkey": "^0.8.0",
|
||||||
"html-webpack-plugin": "^3.2.0",
|
"html-webpack-plugin": "^3.2.0",
|
||||||
"http-server": "^0.11.1",
|
"http-server": "^0.11.1",
|
||||||
@ -67,6 +67,7 @@
|
|||||||
"trezor-connect": "^5.0.32",
|
"trezor-connect": "^5.0.32",
|
||||||
"web3": "1.0.0-beta.35",
|
"web3": "1.0.0-beta.35",
|
||||||
"webpack": "^4.16.3",
|
"webpack": "^4.16.3",
|
||||||
|
"webpack-build-notifier": "^0.1.29",
|
||||||
"webpack-bundle-analyzer": "^2.13.1",
|
"webpack-bundle-analyzer": "^2.13.1",
|
||||||
"whatwg-fetch": "^2.0.4",
|
"whatwg-fetch": "^2.0.4",
|
||||||
"yarn-run-all": "^3.1.1"
|
"yarn-run-all": "^3.1.1"
|
||||||
|
@ -2,8 +2,10 @@ import webpack from 'webpack';
|
|||||||
import GitRevisionPlugin from 'git-revision-webpack-plugin';
|
import GitRevisionPlugin from 'git-revision-webpack-plugin';
|
||||||
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
||||||
import FlowWebpackPlugin from 'flow-webpack-plugin';
|
import FlowWebpackPlugin from 'flow-webpack-plugin';
|
||||||
|
import WebpackBuildNotifierPlugin from 'webpack-build-notifier';
|
||||||
|
|
||||||
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
|
// turn on for bundle analyzing
|
||||||
|
// import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
SRC, BUILD, PORT, PUBLIC,
|
SRC, BUILD, PORT, PUBLIC,
|
||||||
@ -93,6 +95,10 @@ module.exports = {
|
|||||||
hints: false,
|
hints: false,
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
new WebpackBuildNotifierPlugin({
|
||||||
|
title: 'Trezor Wallet',
|
||||||
|
suppressSuccess: true,
|
||||||
|
}),
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
COMMITHASH: JSON.stringify(gitRevisionPlugin.commithash()),
|
COMMITHASH: JSON.stringify(gitRevisionPlugin.commithash()),
|
||||||
}),
|
}),
|
||||||
@ -106,11 +112,11 @@ module.exports = {
|
|||||||
inject: true,
|
inject: true,
|
||||||
favicon: `${SRC}images/favicon.ico`,
|
favicon: `${SRC}images/favicon.ico`,
|
||||||
}),
|
}),
|
||||||
new BundleAnalyzerPlugin({
|
// new BundleAnalyzerPlugin({
|
||||||
openAnalyzer: false,
|
// openAnalyzer: false,
|
||||||
analyzerMode: false, // turn on to generate bundle pass 'static'
|
// analyzerMode: false, // turn on to generate bundle pass 'static'
|
||||||
reportFilename: 'bundle-report.html',
|
// reportFilename: 'bundle-report.html',
|
||||||
}),
|
// }),
|
||||||
new webpack.optimize.OccurrenceOrderPlugin(),
|
new webpack.optimize.OccurrenceOrderPlugin(),
|
||||||
new webpack.NoEmitOnErrorsPlugin(),
|
new webpack.NoEmitOnErrorsPlugin(),
|
||||||
new webpack.HotModuleReplacementPlugin(),
|
new webpack.HotModuleReplacementPlugin(),
|
||||||
|
@ -3,7 +3,6 @@ import webpack from 'webpack';
|
|||||||
import GitRevisionPlugin from 'git-revision-webpack-plugin';
|
import GitRevisionPlugin from 'git-revision-webpack-plugin';
|
||||||
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
||||||
import CopyWebpackPlugin from 'copy-webpack-plugin';
|
import CopyWebpackPlugin from 'copy-webpack-plugin';
|
||||||
import FlowWebpackPlugin from 'flow-webpack-plugin';
|
|
||||||
import { SRC, BUILD, PUBLIC } from './constants';
|
import { SRC, BUILD, PUBLIC } from './constants';
|
||||||
|
|
||||||
const gitRevisionPlugin = new GitRevisionPlugin();
|
const gitRevisionPlugin = new GitRevisionPlugin();
|
||||||
@ -68,7 +67,6 @@ module.exports = {
|
|||||||
'process.env.BUILD': JSON.stringify(process.env.BUILD),
|
'process.env.BUILD': JSON.stringify(process.env.BUILD),
|
||||||
COMMITHASH: JSON.stringify(gitRevisionPlugin.commithash()
|
COMMITHASH: JSON.stringify(gitRevisionPlugin.commithash()
|
||||||
}),
|
}),
|
||||||
new FlowWebpackPlugin(),
|
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
chunks: ['index'],
|
chunks: ['index'],
|
||||||
template: `${SRC}index.html`,
|
template: `${SRC}index.html`,
|
||||||
|
10
yarn.lock
10
yarn.lock
@ -7058,7 +7058,7 @@ node-libs-browser@^2.0.0:
|
|||||||
util "^0.10.3"
|
util "^0.10.3"
|
||||||
vm-browserify "0.0.4"
|
vm-browserify "0.0.4"
|
||||||
|
|
||||||
node-notifier@^5.2.1:
|
node-notifier@5.2.1, node-notifier@^5.2.1:
|
||||||
version "5.2.1"
|
version "5.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.2.1.tgz#fa313dd08f5517db0e2502e5758d664ac69f9dea"
|
resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.2.1.tgz#fa313dd08f5517db0e2502e5758d664ac69f9dea"
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -10970,6 +10970,14 @@ webpack-addons@^1.1.5:
|
|||||||
dependencies:
|
dependencies:
|
||||||
jscodeshift "^0.4.0"
|
jscodeshift "^0.4.0"
|
||||||
|
|
||||||
|
webpack-build-notifier@^0.1.29:
|
||||||
|
version "0.1.29"
|
||||||
|
resolved "https://registry.yarnpkg.com/webpack-build-notifier/-/webpack-build-notifier-0.1.29.tgz#d71f89bb94346c6b748e07aa3d117d2beb0a151f"
|
||||||
|
dependencies:
|
||||||
|
ansi-regex "^2.0.0"
|
||||||
|
node-notifier "5.2.1"
|
||||||
|
strip-ansi "^3.0.1"
|
||||||
|
|
||||||
webpack-bundle-analyzer@^2.13.1:
|
webpack-bundle-analyzer@^2.13.1:
|
||||||
version "2.13.1"
|
version "2.13.1"
|
||||||
resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-2.13.1.tgz#07d2176c6e86c3cdce4c23e56fae2a7b6b4ad526"
|
resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-2.13.1.tgz#07d2176c6e86c3cdce4c23e56fae2a7b6b4ad526"
|
||||||
|
Loading…
Reference in New Issue
Block a user