diff --git a/packages/razzle/config/createConfig.js b/packages/razzle/config/createConfig.js index 303a889ae..a6032cb6a 100644 --- a/packages/razzle/config/createConfig.js +++ b/packages/razzle/config/createConfig.js @@ -15,6 +15,7 @@ const paths = require('./paths'); const getClientEnv = require('./env').getClientEnv; const nodePath = require('./env').nodePath; const errorOverlayMiddleware = require('react-dev-utils/errorOverlayMiddleware'); +const WebpackBar = require('webpackbar'); const postCssOptions = { ident: 'postcss', // https://webpack.js.org/guides/migrating/#complex-options @@ -519,12 +520,16 @@ module.exports = ( config.plugins = [ ...config.plugins, // Use our own FriendlyErrorsPlugin during development. - new FriendlyErrorsPlugin({ - verbose: dotenv.raw.VERBOSE, - target, - onSuccessMessage: `Your application is running at http://${ - dotenv.raw.HOST - }:${dotenv.raw.PORT}`, + // new FriendlyErrorsPlugin({ + // verbose: dotenv.raw.VERBOSE, + // target, + // onSuccessMessage: `Your application is running at http://${ + // dotenv.raw.HOST + // }:${dotenv.raw.PORT}`, + // }), + new WebpackBar({ + color: target === 'web' ? '#f56be2' : '#c065f4', + name: target === 'web' ? 'client' : 'server', }), ]; } diff --git a/packages/razzle/package.json b/packages/razzle/package.json index 456765ad6..1dbf1bb6d 100644 --- a/packages/razzle/package.json +++ b/packages/razzle/package.json @@ -37,6 +37,7 @@ "babel-loader": "7.1.1", "babel-preset-razzle": "^2.0.0-alpha.7", "chalk": "1.1.3", + "consola": "^1.2.0", "css-loader": "0.28.11", "dotenv": "4.0.0", "eslint": "4.5.0", @@ -66,6 +67,7 @@ "webpack": "^4.4.1", "webpack-dev-server": "3.0.0", "webpack-node-externals": "1.6.0", + "webpackbar": "^2.4.0", "whatwg-fetch": "^2.0.3" } } diff --git a/yarn.lock b/yarn.lock index c4b93c1a6..94bf85faa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -288,14 +288,6 @@ version "2.0.0" resolved "https://registry.yarnpkg.com/@types/mime/-/mime-2.0.0.tgz#5a7306e367c539b9f6543499de8dd519fac37a8b" -"@types/node@*": - version "9.6.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-9.6.1.tgz#e2d374ef15b315b48e7efc308fa1a7cd51faa06c" - -"@types/node@^8.0.53", "@types/node@^8.9.4": - version "8.10.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.1.tgz#aac98b810c50568054486f2bb8c486d824713be8" - "@types/react-dom@^16.0.0": version "16.0.4" resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.0.4.tgz#2e8fd45f5443780ed49bf2cdd9809e6091177a7d" @@ -2255,7 +2247,7 @@ cli-cursor@^1.0.2: dependencies: restore-cursor "^1.0.1" -cli-cursor@^2.1.0: +cli-cursor@^2.0.0, cli-cursor@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" dependencies: @@ -2483,6 +2475,15 @@ connect-history-api-fallback@^1.3.0: version "1.5.0" resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz#b06873934bc5e344fef611a196a6faae0aee015a" +consola@^1.1.3, consola@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/consola/-/consola-1.2.0.tgz#90fd1fed8c8aa2b239e953db5847dec15bb44405" + dependencies: + chalk "^2.3.2" + figures "^2.0.0" + lodash "^4.17.5" + std-env "^1.1.0" + console-browserify@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" @@ -5119,7 +5120,7 @@ is-callable@^1.1.1, is-callable@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" -is-ci@^1.0.10: +is-ci@^1.0.10, is-ci@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.1.0.tgz#247e4162e7860cebbdaf30b774d6b0ac7dcfe7a5" dependencies: @@ -5265,6 +5266,10 @@ is-number@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" +is-number@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-5.0.0.tgz#c393bc471e65de1a10a6abcb20efeb12d2b88166" + is-obj@^1.0.0, is-obj@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" @@ -6349,9 +6354,9 @@ lerna-changelog@^0.7.0: string.prototype.padend "^3.0.0" yargs "^6.6.0" -lerna@2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/lerna/-/lerna-2.9.0.tgz#303f70bc50b1c4541bdcf54eda13c36fe54401f3" +lerna@2.9.1: + version "2.9.1" + resolved "https://registry.yarnpkg.com/lerna/-/lerna-2.9.1.tgz#d7d21793ad35ae7733733ced34ce30f5b3bb1abe" dependencies: async "^1.5.0" chalk "^2.1.0" @@ -6747,6 +6752,14 @@ log-update@^1.0.2: ansi-escapes "^1.0.0" cli-cursor "^1.0.2" +log-update@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/log-update/-/log-update-2.3.0.tgz#88328fd7d1ce7938b29283746f0b1bc126b24708" + dependencies: + ansi-escapes "^3.0.0" + cli-cursor "^2.0.0" + wrap-ansi "^3.0.1" + loglevel@^1.4.1: version "1.6.1" resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.1.tgz#e0fc95133b6ef276cdc8887cdaf24aa6f156f8fa" @@ -7211,6 +7224,10 @@ nanomatch@^1.2.9: snapdragon "^0.8.1" to-regex "^3.0.1" +nanoseconds@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/nanoseconds/-/nanoseconds-1.0.1.tgz#596efc62110766be1ede671fedd861f5562318d3" + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -8274,6 +8291,13 @@ pretty-format@^3.5.1: version "3.8.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-3.8.0.tgz#bfbed56d5e9a776645f4b1ff7aa1a3ac4fa3c385" +pretty-time@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/pretty-time/-/pretty-time-1.0.0.tgz#544784adecaa2cd7d045ff8a8f1d4791c8e06e23" + dependencies: + is-number "^5.0.0" + nanoseconds "^1.0.0" + private@^0.1.6, private@^0.1.7: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" @@ -9798,6 +9822,12 @@ static-extend@^0.1.1: version "1.4.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" +std-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/std-env/-/std-env-1.1.0.tgz#f89ded0c3facd5b53cd3cda288779ed88d3b87ad" + dependencies: + is-ci "^1.1.0" + stealthy-require@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" @@ -10073,7 +10103,7 @@ table@4.0.2: slice-ansi "1.0.0" string-width "^2.1.1" -table@^4.0.1: +table@^4.0.1, table@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/table/-/table-4.0.3.tgz#00b5e2b602f1794b9acaf9ca908a76386a7813bc" dependencies: @@ -10797,6 +10827,21 @@ webpack@^4.4.1: watchpack "^1.5.0" webpack-sources "^1.0.1" +webpackbar@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/webpackbar/-/webpackbar-2.4.0.tgz#858cc5d9b44085214ca628a1f676d5a54e35b7f1" + dependencies: + chalk "^2.3.2" + consola "^1.1.3" + figures "^2.0.0" + loader-utils "^1.1.0" + lodash "^4.17.5" + log-update "^2.3.0" + pretty-time "^1.0.0" + schema-utils "^0.4.5" + std-env "^1.1.0" + table "^4.0.3" + websocket-driver@>=0.5.1: version "0.7.0" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.0.tgz#0caf9d2d755d93aee049d4bdd0d3fe2cca2a24eb" @@ -10896,6 +10941,13 @@ wrap-ansi@^2.0.0: string-width "^1.0.1" strip-ansi "^3.0.1" +wrap-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-3.0.1.tgz#288a04d87eda5c286e060dfe8f135ce8d007f8ba" + dependencies: + string-width "^2.1.1" + strip-ansi "^4.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"